Net::LDAP::AutoServer - Automated LDAP server choosing.
Version 0.2.1
use Net::LDAP::AutoServer; my $as = Net::LDAP::AutoServer->new();
This is the methods to use to for getting the information.
It is taken in a camma seperated list with the default being 'hostname,dns,devldap,env,user'.
The available values are listed below.
hostname devldap env user
This fetches it using /dev/ldap/ if possible.
It will return false if /dev/ldap/ is not a directory or does not resit.
bind CAfile CApath checkCRL clientCert clientKey pass port server my $returned=$autoserver->byDevLDAP;
This only populates the server field.
This will run s/^[0-9a-zA-Z\-\_]*\./ldap./ over the hostname then try to connect to it.
If it can't lookup the hostname or connect, it returns undef.
Once connected, it will check to see if it is possible to start TLS.
startTLS server port
This will populate as much as possible using enviromental variables.
EESDP-BindDN EESDP-CAfile EESDP-CApath EESDP-CheckCRL EESDP-ClientCert EESDP-ClientKey EESDP-Port EESDP-Server EESDP-StartTLS
bind CAfile CApath checkCRL clientCert clientKey port server startTLS
Net::LDAP::AutoServer-bind Net::LDAP::AutoServer-CAfile Net::LDAP::AutoServer-CApath Net::LDAP::AutoServer-checkCRL Net::LDAP::AutoServer-clientCert Net::LDAP::AutoServer-clientkey Net::LDAP::AutoServer-port Net::LDAP::AutoServer-server Net::LDAP::AutoServer-startTLS
This requires $ENV{USER} to be defined. If it is not, undef is returned.
This looks for '~/.ldappass' and '~/.ldapbind'.
bind pass my $returned=$autoserver->byUser;
This clears all previous selections.
$autoserver->clear;
This forms a LDAP connections.
my ($ldap, $mesg, $success, $errorString)=$autoserver->connect; if(!$success){ if(!$ldap){ print "Failed to connect to LDAP either bad info or none present.\n"; }else{ print "Failed to bind or start TLS.\n". $mesg->error_desc."\n"; } }
More information about this can be found at the URL below.
http://eesdp.org/eesdp/ldap-kmod.html
Zane C. Bowers, <vvelox at vvelox.net>
<vvelox at vvelox.net>
Please report any bugs or feature requests to bug-net-ldap-autoserver at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-LDAP-AutoServer. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-net-ldap-autoserver at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Net::LDAP::AutoServer
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-LDAP-AutoServer
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Net-LDAP-AutoServer
CPAN Ratings
http://cpanratings.perl.org/d/Net-LDAP-AutoServer
Search CPAN
http://search.cpan.org/dist/Net-LDAP-AutoServer/
Copyright 2009 Zane C. Bowers, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Net::LDAP::AutoServer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::LDAP::AutoServer
CPAN shell
perl -MCPAN -e shell install Net::LDAP::AutoServer
For more information on module installation, please visit the detailed CPAN module installation guide.