Hi,

not a perl-ldap problem but a general Perl question:
1) Hashes in Perl are case-sensitive: ldap vs. LDAP.
2) You need to write $ldapcnnection->{ldap} or $$ldapconnection{ldap}
    as $ldapconnection is a hash ref

Hope it helps
Peter


On Tuesday, 19. September 2006 17:58, Zane C. Bowers wrote:
> I am writing a function that takes a associative array containing what
> is returned by Net::LDAP.
>
> I am passing it to the function like this...
>
> my %results=mwc_dhcp_host_add({%ldapconnection},
>                               $config{ip},$config{mac},
>                               $config{baseDN},$config{user});
>
> $ldapconnection{ldap} is what is returned by Net::LDAP.
>
>
> my $ldapconnection=$_[0]; is how I am then picking up it up at the
> beginning of the function.
>
> I am then creating a new entry and then trying to pass the connection
> to it like this...
>
> my $result=$newEntry->update(${$ldapconnection}{LDAP});
>
>
> This results in this following error.
>
> Can't call method "add" on an undefined value
> at /usr/local/lib/perl5/site_perl/5.8.8/Net/LDAP/Entry.pm line 239.
>
>
> Any one have any idea what is happening there?

-- 
Peter Marschall
[EMAIL PROTECTED]

Reply via email to