Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Net::LDAP object inside a callback function

7 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!
0 new messages