| Catmandu::Importer::LDAP(3pm) | User Contributed Perl Documentation | Catmandu::Importer::LDAP(3pm) |
Catmandu::Importer::LDAP - Package that imports LDAP directories
# From the command line
# Anonymous bind to find all 'Patrick's
$ catmandu convert LDAP \
--host ldaps://ldaps.ugent.be \
--search-filter '(givenName=Patrick)' \
--search-base 'dc=ugent, dc=be' to YAML
# From Perl
use Catmandu;
my $importer = Catmandu->importer('LDAP',
host => 'ldaps://ldaps.ugent.be' ,
search_filter => '(givenName=Patrick)' ,
search_base => 'dc=ugent, dc=be'
);
my $exporter = Catmandu->exporter('YAML');
$exporter->add_many($importer);
$exporter->commit;
(givenName=Patrick) # search Patrick
(&(givenName=Patrick)(postalCode=9000)) # search Patrick AND postalcode=9000
(|)(givenName=Patrick)(postalCode=9000)) # search Patrick OR postcalcode=9000
Every Catmandu::Importer is a Catmandu::Iterable all its methods are inherited. The methods are not idempotent: LDAP streams can only be read once.
Catmandu , Catmandu::Importer , Catmandu::Iterable
| 2023-02-04 | perl v5.36.0 |