From: Mark W. <mew...@un...> - 2000-07-12 21:36:18
|
What type of server? What's the output of $ldap->debug(3); mark On Tue, 11 Jul 2000, Safford, Brian wrote: > With the following code snippet I "borrowed" from a posting from a few days > ago: > > ------ snip -------- > #!/usr/local/bin/perl > > use Net::LDAP; > use MIME::Base64; > use Net::LDAP::Control; > use Net::LDAP::Constant qw( LDAP_CONTROL_PAGED LDAP_CONTROL_SORTREQUEST ); > > $page = Net::LDAP::Control->new( LDAP_CONTROL_PAGED, size => 50); > $sort = Net::LDAP::Control->new( LDAP_CONTROL_SORTREQUEST, > order => 'mail'); > > @args = ( base => "ou=smtp,ou=gm,ou=messaging,o=eds,c=us", > scope => "subtree", > filter => "(objectClass=edsMailbox)", > control => [ $sort, $page ] ); > > while (($mesg = $LDAP->search( @args ))) { > print_subnet($_) foreach $mesg->entries; > last if $mesg->count < $page->size; > ($resp) = $mesg->control( LDAP_CONTROL_PAGED ); > $page->cookie($resp->cookie); > } > -------- snip -------- > > I receive the error (after the first 50 entries are displayed): > > Can't call method "cookie" on an undefined value at paged.pl line 46. > > where line 46 is "$page->cookie($resp->cookie);" > > I'm using ActiveState Perl 5.005_03, with perl-ldap 0.19, and Convert-ASN1 > 0.07. > > Any help would be greatly appreciated. > > Regards, > > Brian Safford > EDS - E.solutions - E.messaging > > > > |