Catman...::LDAP(3pm)
π Catman...::LDAP π
okay bestie, welcome to the Catmandu::Importer::LDAP page β this is the manual page for Catman...::LDAP(3pm) from the User Contributed Perl Documentation, and she's a whole package that imports LDAP directories. yes. directories. from LDAP. we love her. π«Ά
β¨ NAME β¨
Catmandu::Importer::LDAP β a package that imports LDAP directories. that's the vibe. that's the whole job. π
π SYNOPSIS π
first up, from the command line, no Perl required, just vibes:
# 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
not me finding every single Patrick in Ghent through an anonymous bind π iconic honestly.
and then from Perl, if you're feeling extra fancy:
# 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;
importer in, exporter out, add_many, commit, done. slay. π
π CONFIGURATION π
these are the little knobs you get to turn, bestie. turn them gently.
hostβ the LDAP host you're connecting to. that's where the directory lives, go say hi. π¦baseβ the base you bind to. if you don't specify it, it's an anonymous bind β no name, no password, just vibes. πpasswordβ the password needed for the bind. yes, the bind needs a password. no, we don't ask questions. πsearch_baseβ the DN that is the base object entry relative to which the search is to be performed. like, "start looking from here, queen." πsearch_filterβ one or more search filters. e.g.:
(givenName=Patrick) # search Patrick
(&(givenName=Patrick)(postalCode=9000)) # search Patrick AND postalcode=9000
(|)(givenName=Patrick)(postalCode=9000)) # search Patrick OR postcalcode=9000
look at her. AND logic, OR logic, she contains multitudes. π
β METHODS β
every Catmandu::Importer is a Catmandu::Iterable, so literally all its methods are inherited. free methods, we love a generous queen. π
but listen, and listen good: the methods are not idempotent β LDAP streams can only be read once. read it once, bestie. there is no rewind. no take-backs. it's giving one-shot. π
πΈ SEE ALSO πΈ
go be nosy, these three are the family:
CatmanduCatmandu::ImporterCatmandu::Iterable
and that's the page!! β¨ this was Catman...::LDAP(3pm) from the User Contributed Perl Documentation, footer edition: perl v5.36.0, dated 2023-02-04. mwah, take care of her, and remember β anonymous bind responsibly π«Άπ
π¦ where this page comes from
- debian bookworm: libcatmandu-ldap-perl 0.0105-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatmandu-ldap-perl 0.0105-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatmandu-ldap-perl 0.0105-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatmandu-ldap-perl 0.0105-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-ldap-perl 0.0105-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms