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?

Attachment: signature.asc
Description: PGP signature

Reply via email to