----- Forwarded message from ati...@4u... -----
From: ati...@4u...
Date: Tue, 12 Dec 2000 18:16:07 +0100
X-Mailer: Mozilla 4.74 [en] (X11; U; Linux 2.2.16 i686)
To: gb...@po...
Subject: perl-ldap. How to find out if LDAP connection already exists
Hi Graham.
How is life.
I have been using your module in my projects.
Recently I started using it with mod_perl
I havent figured out how to find out of the connection to LDAP exists.
I dont want to make a connection each time.
my connect sub looks something like this.
sub connect {
if ($LDAP) {
return}
} else {
$LDAP=Net::LDAP->new($self->{'host'});
try($LDAP->bind(dn => $self->{'user'}, password =>
$self->{'pass'}));
}
}
This doesnt catch the exception that the connection is closed from the
server.
How may I test if the connection exists or not?
thanks for your help.
--
Atif Ghaffar
Internet Development Manager
4unet AG/SA
-------------------------.
+41 78 787 51 45 ¦ voice
+41 24 441 09 03 ¦ fax
http://www.4unet.net ¦ www
http://atif.developer.ch ¦ homepage
ati...@4u... ¦ email
Do you speak Unix?
----- End forwarded message -----
|