=head1 NAME ResourcePool::Factory::Net::LDAP - A L Factory for L =head1 SYNOPSIS use ResourcePool::Factory::Net::LDAP; my $factory = ResourcePool::Factory::Net::LDAP->new($hostname, [NewOptions]); =head1 DESCRIPTION This class is a factory class for L resources to be used with the L. Please have a look at the L documentation to learn about the purpose of such a factory. =head2 Snew($hostname, @NewOptions)> The arguments for the new method are passed to the new method of L. =over 4 =item $hostname The LDAP server name. =item @NewOptions - Optional The additional options to be passed to the new method of L. =back =head2 S<$factory-Ebind(@BindOptions)> The arguments to be passed to the bind() method of L. Please not that this module will always do a bind to the LDAP server, if you do not specify any bind arguments the bind will be anonymously. The bind() call is used to check the vitality of the LDAP connection, if it fails L will throw it away.. =head2 S<$factory-Estart_tls(@TLSOptions)> If you call this method, the L connections created through this factory will be upgraded to TLS directly after the establishment. The options to this method are the same as for the same named method of the L module. If you specify this option, the start_tls operation will always be performed BEFORE L is called. This is even true if you call the start_tls() operation of the factory after the bind() method. This ensures the the bind credentials are encrypted if you use TLS. The L design does not allow the mixture of encrypted/unencrypted connections in one pool. Even if it's possible it is not recommended to use the start_tls() method of L directly when you use L to manage your connections. In the rare cases where you need to mix encrypted and not encrypted connections (e.g. to use encrypted for authentication and a plain connection for other operations) you should use two separate Ls, one configured with start_tls, the other without. =head1 EXAMPLES use ResourcePool; use ResourcePool::Factory::Net::LDAP; my $factory = ResourcePool::Factory::Net::LDAP->new("ldaphost", version => 2); $factory->bind('cn=Manager,dc=fatalmind,dc=com', password => 'secret'); =head1 SEE ALSO L, L, L =head1 AUTHOR Copyright (C) 2001-2003 by Markus Winand This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.