Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Different Strategy (Was: Net::LDAP doesn't return until end of loop)

by ypcat (Beadle)
on Jul 01, 2003 at 05:07 UTC ( [id://270408]=note: print w/replies, xml ) Need Help??


in reply to Different Strategy (Was: Net::LDAP doesn't return until end of loop)
in thread Net::LDAP doesn't return until end of loop

I re-did the code to match you're strategy, cause I am not against changing what I am doing. This is my first time with Perl/LDAP and it is a time pressed issue so I really appreciate all you're help and guidance. After re-writing the code it is still experiencing the same issue. Here is the new code.
sub ldapsearch { my $mac = shift; print "$mac\n"; my $searchobj = $connection->search( base => 'o=ldap', scope => 'sub', filter => "cn=$mac", attrs => @attrs, #note I al +so tried \@attrs ); $searchobj->code && die $searchobj->error; while ( my $entry = $searchobj->shift_entry) { print $entry->dn, "\n"; print $entry->get_value('plan'); print $entry->get_value('ipaddress'); print $entry->get_value('username'); } }


Any suggestion ?

Replies are listed 'Best First'.
Re: Re: Different Strategy (Was: Net::LDAP doesn't return until end of loop)
by lachoy (Parson) on Jul 01, 2003 at 12:21 UTC

    Sorry, but the only thing I could suggest at this point is create your LDAP connection with 'debug => 12' or such (see Net::LDAP docs under new() for what this means). Good luck.

    Oh, and one more thing: it's definitely \@attrs

    Chris
    M-x auto-bs-mode

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://270408]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-03-28 09:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found