On 24/3/04 3:49 pm, Claude <[EMAIL PROTECTED]> wrote:

> I'd like to print the various error message that the ::Message object
> returns:
> -------------------------------------
> my $ldap = Net::LDAP->new( $host,
>   async => 0,
>   onerror => 'die'
>   );
> 
> my $msg = $ldap->bind( $usr, password => $pwd );
> 
> #if ( $msg->is_error() )
> {
> my $err = $msg->error( $msg );
> my $err_name = $msg->error_name( $msg );
> my $err_text = $msg->error_text( $msg );
> my $err_desc = $msg->error_desc( $msg );
> t "Status = \t$err\n\tname = $err_name\n\ttext = $err_text\n\tdesc =
> $err_desc\n";
> }
> 
> $msg = $ldap->unbind();
> -------------------------------------
> 
> That works fine when the $usr and $pwd bind ok (which is weird for an
> error status!). Unfortunately, it crashes when binding is not ok, with
> the following output:
> 
> -- output ----------------------------
> testcases> ./t/040.pl -h i -D uid=batman,ou=People,dc=stm,dc=net -w fake
> -trace
> Ambiguous use of {reverse} resolved to {"reverse"} at
> /home/claude/lib/Perl5.004_04/lib/perl5/Net/LDAP/Util.pm line 313, <DATA>
> chunk 225.

That's a pretty old version of perl. I think Net::LDAP requires a minimum of
5.00503.

Cheers,

Chris

Reply via email to