From: Jonathan L. <jon...@le...> - 2000-09-15 17:34:42
|
Duh, should have gave a little more info. I am using Net::LDAP 0.19 with OpenLDAP on a Linux webserver. I cannot easily upgrade the module, since it is a production machine and with recent API changes, so telling me get the newest version isn't really helpful. And this version has been working fine for months and I am not doing anything new. Woohoo, just took another look and caught my mistake. I guess a third cup of coffee helped. In case any one wants to know what happened: I wrote the same wrapper for ldap->search and consolidated them into one module, after they seemed to be exactly the same. But the last 2 arguments were in opposite order, so instead of passing an empty array ref as the attributes to find (which meant all), I was passing an empty arrayref as the base. Would it be possible to have a better error message? Like : "Base is not valid", or something? Thanks for your time. Graham Barr (gb...@po...) was saying: > Could you post the code you are using to call ->search with ? > > Which version of Net::LDAP do you have installed ? The latest is 0.22 > > Graham. > > On Fri, Sep 15, 2000 at 10:26:14AM -0500, Jonathan Leto wrote: > > Hello everyone, just a quick question that my sleepless brain can't > > figure out this early in the morning. > > > > I was working all day yesterday writing an ldap web app, and today I > > go to test it out and I get : > > > > Can't call method "dn" on unblessed reference at /usr/lib/perl5/site_perl/5.005/Net/LDAP.pm line 230. > > > > which pertains to: > > > > my %stash = ( > > baseObject => ref($base) ? $base->dn : $base, > > scope => 2, > > derefAliases => 2, > > sizeLimit => $arg->{sizelimit} || 0, > > timeLimit => $arg->{timelimit} || 0, > > typesOnly => $arg->{typesonly} || $arg->{attrsonly} || 0, > > filter => $filter, > > attributes => $arg->{attrs} || [] > > ); > > > > I haven't changed anything that I can see would cause a problme and all my scripts pass syntax checks, > > so I was wondering if anybody could help me figure out where to look for the problem. > > > > Thanks. > > > > -- > > jon...@le... > > "With pain comes clarity." > > > > -- jon...@le... "With pain comes clarity." |