Re: Net::LDAP scheme() method

Graham Barr <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.ldap
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.