Passing a referece to a hash of "attribute => values" to Net::LDAP::add
somewhat as follows:
my %ref = ( "objectclass => [ "top", "etc" ] );
$ldap->add($dn, "attrs" => \%ref)
...results in a compilation error:
Not an ARRAY reference at /usr/local/lib/perl5/site_perl/5.8.0/Net/LDAP.pm
line 439, <INPUT> line 1.
Changing:
439c439
< $entry->add(%{$arg->{attrs} || $arg->{attr} || []});
---
> $entry->add(@{$arg->{attrs} || $arg->{attr} || []});
...gets rid of the error.
Is this a valid bug, or have I done somthing wrong?
Cheers,
V.