Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

What do I use for the callback function in Net::LDAP::Control::Paged?

by adamsj (Hermit)
on Oct 07, 2025 at 20:20 UTC ( [id://11166437]=perlquestion: print w/replies, xml ) Need Help??

adamsj has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to move from an LDAP server which allowed huge queries to an AD server that limits me to a thousand records, and Net::LDAP::Control::Paged looks like the tool I need. But I can't for the life of me understand what the callback function is supposed to be.

They laughed at Joan of Arc, but she went right ahead and built it. --Gracie Allen
  • Comment on What do I use for the callback function in Net::LDAP::Control::Paged?

Replies are listed 'Best First'.
Re: What do I use for the callback function in Net::LDAP::Control::Paged?
by marto (Cardinal) on Oct 08, 2025 at 07:27 UTC

    You've not said what you want to do with each of the results you're paging through. For example to print the DN for each result:

    sub process_entry { my ($message, $entry) = @_; return unless $entry; say $entry->dn; $message->pop_entry; }

    See Using the callback subroutine approach from Net::LDAP::FAQ.

      Thanks so much! Now I understand--and thanks also for the link to the FAQ.

      They laughed at Joan of Arc, but she went right ahead and built it. --Gracie Allen

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11166437]
Approved by GrandFather
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2025-11-07 19:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (65 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.