App-Addex-AddressBook-LDAP
view release on metacpan or search on metacpan
lib/App/Addex/AddressBook/LDAP.pm view on Meta::CPAN
my $self = bless {
uri => $uri,
} => $class;
my $ldap = Net::LDAP->new(
"$uri",
raw => qr/(?i:^jpegPhoto|;binary)/,
onerror => 'die'
) or confess $@;
$ldap->bind();
$self->{ldap} = $ldap;
return $self;
}
sub _entrify {
my ($self, $entry) = @_;
my @emails = map { App::Addex::Entry::EmailAddress->new($_) }
$entry->get_value('mail');
lib/App/Addex/AddressBook/LDAP.pm view on Meta::CPAN
filename = /home/mxey/.mutt_aliases
The cn attribute is used as the name, the uid attribute is used as the nick and
mail attributes are used as e-mail addresses.
=head1 BUGS
Attributes in the LDAP URI are ignored. It might be nice to specify attributes
to use as mail addresses in the URI.
Only anonymous binding is supported. If you need to specify a binddn, please
open a bugreport and/or send a patch :-)
=head1 AUTHOR
Maximilian Gass <mxey@ghosthacking.net>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Maximilian Gass.
( run in 3.103 seconds using v1.01-cache-2.11-cpan-2398b32b56e )