Hi,

I am getting unexpected results when calling get_value on an attribute that
does not exist within an entry.  My code looks like:

    print "here\n";
    print Dumper($entry->get_value("unknownattribute"));
    print "there\n";

and the results look like:

    % ./get_value.pl
    here
    there
   %

I edited /Library/Perl/5.8.6/Net/LDAP/Entry.pm to return undef at line 132:

132c132
<   my $attr  = $attrs->{$type} or return;
---
>   my $attr  = $attrs->{$type} or return undef;

My results then look as expected:

    % ./get_value.pl
    here
    $VAR1 = undef;
    there
    %

Thanks,
Michael G. Vonk

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to