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.