Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 ( #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 ?
  • Comment on Re: Different Strategy (Was: Net::LDAP doesn't return until end of loop)
  • Download Code

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? | Other CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2022-06-27 11:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (88 votes). Check out past polls.

    Notices?