Could someone provide for me an example of what $message->error() would
return if the result of a query were LDAP_PARTIAL_RESULTS? I'd like to know
precisely what to look for (i.e. regex) when searching for referral urls.
The code that I'm inheriting (and rewriting) currently has this:
my @urls;
if ( $message->code() == LDAP_PARTIAL_RESULTS ) {
foreach my $line ( split /\n/, $message->error() ) {
next unless ( $line =~ m,(ldap://[^:]+:\d+), );
push @urls, $1;
}
}
But I won't be comfortable with this until I can actually see the actual
output of $message->error().
I see a couple of examples with ldapsearch(1) at
http://www.ldap.verisignlabs.com/ldapsearch.html, but I don't know how
similar the results are between it and the Perl API.
Thanks!
-dan