develooper Front page | perl.ldap | Postings from March 2010

Re: Net::LDAP scheme() method

Thread Previous | Thread Next
From:
Graham Barr
Date:
March 9, 2010 16:39
Subject:
Re: Net::LDAP scheme() method
Message ID:
D9814C6E-3636-470E-A8FE-18D084DD1BC1@pobox.com
On Mar 9, 2010, at 5:59 PM, Prentice Bisbal wrote:
> Graham Barr wrote:
>> On Mar 9, 2010, at 3:04 PM, Prentice Bisbal wrote:
>>> # Connect to LDAP server
>>> my $ldap = Net::LDAP->new(\@ldap_servers,
>>> 		          onerror => 'die'		
>>>          		  )  || die "Could not connect to LDAP servers.\n";
>>> 
>>> $connection_scheme = $ldap->scheme();
>>> 
>>> # Check that we have an encrypted connection. If not, start TLS
>>> if ($connection_scheme ne 'ldaps') {
>>>   $ldap->start_tls( verify => 'require',
>>> 		      cafile => $tls_cacert,
>>> 		      capath => $tls_cacertdir
>>> 		      );
>>> }
>>> 
>>> And here's the error:
>>> 
>>> Can't locate object method "scheme" via package "Net::LDAP" at
>>> ./sns_chsh.pl line 92, <LDAP_CONF> line 16.
>> 
>> What version of Net::LDAP do you have installed ?
>> 
>> the scheme method is there in Net/LDAP.pm
> 
> I'm using 0.33, which is what come with the distro I have. In what
> version was the scheme method first available?

0.34

See changes file

http://cpansearch.perl.org/src/GBARR/perl-ldap-0.39/Changes

Graham.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About