Re: Net::LDAP scheme() method

[email protected] (Graham Barr)
Newsgroups perl.ldap
Message-ID <[email protected]>
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

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.