From: Keirnan, P. <pau...@de...> - 2002-08-30 01:22:38
|
Greetings, The FAQ has an example of using callback sub callback { my ( $mesg, $entry) = @_; # First you must check to see if something was returned. # Last execution of callback subroutine will have no # defined entry and mesg object # if ( !defined($entry) ) { print "No records found matching filter $match.\n" if ($mesg->count == 0) ; # if mesg is not defined nothing will print. return; } .... The "print ... if $mesg->count == 0" masks the fact that the first execution of the subroutine has $mesg defined $entry undefined $mesg->count greater than zero Is this expected, unexpected (a bug?), or changed in a later release? I am running: /usr/local/lib/perl5/site_perl/5.6.1/Net/LDAP/ Control.pm:$VERSION = "0.04"; DSML.pm:$VERSION = "0.06"; Entry.pm:$VERSION = "0.15"; Extension.pm:$VERSION = "1.01"; Extra.pm:$VERSION = "0.01"; Filter.pm:$VERSION = "0.12"; LDIF.pm:$VERSION = "0.09"; Message.pm:$VERSION = "1.05"; Schema.pm:$VERSION = "0.10"; Search.pm:$VERSION = "0.07"; Util.pm:$VERSION = "0.06"; Regards, Paul |