Net::LDAP object inside a callback function

6 views
Skip to first unread message

Téssio Fechine

unread,
Mar 30, 2015, 2:15:01 PM3/30/15
to perl...@perl.org
Hi,

I want to pass a callback function to a search command. My function, compare_attributes, uses the method compare on the entry object passed as the 2th parameter. Is there a way to use the method compare without making the Net::LDAP object a global?

sub compare_attributes
(...)
foreach my $a (keys %ATTR) {
$mesg = $LDAP->compare($entry, attr => $a, value => $ATTR{$a});
(...)

Thanks!
Reply all
Reply to author
Forward
0 new messages