From: Graham B. <gb...@po...> - 2000-07-29 22:55:18
|
I know we have talked about this before, but this needs to be fixed. There should be a method which will always return something. Or Net::LDAP::Util needs to be referenced by the docs in ::Message for ->code, but whatever this needs to be made easier to find. Graham. On Fri, Jul 28, 2000 at 05:15:12PM -0400, Jim Harle wrote: > Use > $results->code && die Net::LDAP::Util::ldap_error_text($results->code) > instead of > $results->code && die $results->error; > to get the correct error text > > --Jim Harle > > On Fri, 28 Jul 2000, Graham Barr wrote: > > > ----- Forwarded message from Alex Kilimnik <sac...@ya...> ----- > > > > I have come to another roadblock and have not found > > any documentation on the error I am receiving from > > Perl during the execution of the script. The error I > > am receiving from perl is "Died at ldap.pl line 9". > > > > Below is a copy of my code which I modeled after > > your example in the perldoc. I apologize for > > bothering > > you, I am new to LDAP. > > > > use Net::LDAP; > > > > $ldap = Net::LDAP->new('x.x.x.x') or die "$@"; > > $ldap->bind; > > $results = $ldap->search( base => "o=xxxxxx.com", > > filter => ="(&(sn=Jones))" > > ); > > $results->code && die $results->error; > > foreach $entry ($results->entries) { > > print "$entry->dump\n"; > > } > > $ldap->unbind; > > > > > > Thanks in advance for any assistance. > > > > Regards, > > Alex > > > > __________________________________________________ > > Do You Yahoo!? > > Kick off your party with Yahoo! Invites. > > http://invites.yahoo.com/ > > > > > > ----- End forwarded message ----- > > > > > > |