perl-ldap
view release on metacpan or search on metacpan
lib/Net/LDAP.pod view on Meta::CPAN
=item debug =E<gt> N
Set the debug level. See the L<debug|/debug> method for details.
=item async =E<gt> 1
Perform all operations asynchronously.
=item onerror =E<gt> 'die' | 'warn' | 'undef' | sub { ... }
In synchronous mode, change what happens when an error is detected.
=over 4
=item 'die'
Net::LDAP will croak whenever an error is detected.
=item 'warn'
Net::LDAP will warn whenever an error is detected.
=item 'undef'
Net::LDAP will warn whenever an error is detected and C<-w> is in
effect. The method that was called will return C<undef>.
Note this value is the string C<'undef'>, not the C<undef> value.
=item sub { ... }
The given sub will be called in a scalar context with a single
argument, the result message. The value returned will be the return
value for the method that was called.
=back
=item version =E<gt> N
Set the protocol version being used (default is LDAPv3). This is
useful if you want to talk to an old server and therefore have to use
LDAPv2.
=item raw =E<gt> REGEX
Use REGEX to denote the names of attributes that are to be considered
binary in search results.
When this option is given, Net::LDAP converts all
values of attributes not matching this REGEX into Perl UTF-8 strings
so that the regular Perl operators (pattern matching, ...) can operate
as one expects even on strings with international characters.
If this option is not given, attribute values are treated as byte strings.
Example: raw =E<gt> qr/(?i:^jpegPhoto|;binary)/
=item inet4 =E<gt> N
=item inet6 =E<gt> N
Try to connect to the server using the specified IP protocol only,
i.e. either IPv4 or IPv6.
If the protocol selected is not supported, connecting will fail.
The default is to use any of the two protocols.
=back
B<Example>
$ldap = Net::LDAP->new( 'remote.host', async => 1 );
LDAPS connections have some extra valid options, see the
L<start_tls|/start_tls> method for details. Note the default port
for LDAPS is 636, and the default value for 'sslversion' is the
value used as default by L<IO::Socket::SSL>.
For LDAPI connections, HOST is actually the location of a UNIX domain
socket to connect to. The default location is '/var/run/ldapi'.
=back
=head1 METHODS
Each of the following methods take as arguments some number of fixed
parameters followed by options, these options are passed in a named
fashion, for example
$mesg = $ldap->bind( "cn=me,o=example", password => "mypasswd");
The return value from these methods is an object derived from the
L<Net::LDAP::Message> class. The methods of this class allow
you to examine the status of the request.
=over 4
=item abandon ( ID, OPTIONS )
Abandon a previously issued request. C<ID> may be a number or an
object which is a sub-class of L<Net::LDAP::Message>, returned from a
previous method call.
=over 4
=item control =E<gt> CONTROL
=item control =E<gt> [ CONTROL, ... ]
See L</CONTROLS> below
=item callback =E<gt> CALLBACK
See L</CALLBACKS> below
=back
B<Example>
( run in 1.166 second using v1.01-cache-2.11-cpan-98e64b0badf )