Hello again,

On 2/21/07, Marc Girod <[EMAIL PROTECTED]> wrote:
...
The version of LDAP.pm I use is:

I downloaded and installed perl-ldap-0.34 (without at least some of
the possible optional modules: Authen::SASL, GSSAPI, IO::Socket::SSL ,
XML::SAX::Writer.
All the tests were successful (10 skipped).
This didn't affect the behaviour I described, apart for the line
number, and the path ('site' instead of 'vendor'):

        (in cleanup) Can't call method "FETCH" on an undefined value at
/usr/lib/perl5/site_perl/5.8.5/Net/LDAP.pm line 266 during global
destruction.

Also, I thought I could provide bits of the package code I use:

use strict;
use warnings;
use Carp;
use Net::LDAP;

sub new {
   my $class = shift @_;
   my $self = {};
   $self->{ldap} = Net::LDAP->new('amereast-dc2.ionaglobal.com');
   my $msg = $self->{ldap}->bind(version => 3);
   if ($msg->code != 0) {
       carp "LDAP bind failed: $msg->error_text";
       return undef;
   }
   bless $self, $class;
   return $self;
}

sub DESTROY {
   my $self = shift @_;
   $self->{ldap}->unbind if ($self->{ldap});
}

Marc

Reply via email to