LPM: a problem with modularity using Net::LDAP

Frank Price fprice at upended.org
Thu Nov 2 17:32:39 CST 2000


Since no one has answered, I'll take a shot.

On Thu, Oct 26, 2000 at 02:37:33PM -0400, Joe Hourcle wrote:
> 
> I'm attempting to make a module which essentially returns an object from a
> different module.
> 
> Basically, the plan is, that so I don't have to keep track of multiple
> passwords in multiple places, I'm using a module which contains
> information which I need for conecting to our LDAP server, but which will
> return a Net::LDAP object.
> 
> [and I can pass it arguments so that it'll bind as admin, read-only to
> everything, as a standard user or anonymously, to either the main server, 
> or to one of the two development servers]
> 
> When I return a Net::LDAP object from this module, however, I get:
> 
> 	Can't call method "search" on an undefined value at
> 	./update_ldap.pl line 156.

Where is search()?  The second module?  And you are creating it from
within the first module, or from the actual script?

Do you have a 'use second_module' in the first one?  Or are you
'use'ing both from the actual script?  

Lastly, might be worth starting the debugger to find out just what's
happening.

-Frank.
-- 
Frank Price | fprice at upended.org | www.upended.org/fprice/
GPG key: www.upended.org/fprice/gpg.asc | E Pluribus Unix




More information about the Lexington-pm mailing list