The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Config::LDAPClient::Search - simple encapsulation for search criteria.

SYNOPSIS

    use Config::LDAPClient::Search;

    $s = Config::LDAPClient::Search->new('dc=foo', 'one', '(uid=*)');
    $ldap->search( base => $s->base, scope => $s->scope, filter => $s->filter );

DESCRIPTION

This is a very simple class designed to wrap simple search criteria. Specifically, libnss-ldap.conf lets you specify search critieria for specific maps in the form 'base?scope?filter'; this encapsulates that data and provides convenient access to it.

Methods

$class->new($base, $scope, $filter)

Constructs and returns a new object with the accessors defaulted to the specified values. Any of them can be specified as undef.

$object->base
$object->base($base)

Accessor for the search base.

$object->scope
$object->scope($scope)

Accessor for the search scope.

$object->filter
$object->filter($scope)

Accessor for the search filter.

$object->as_string

Called when the object is stringified. Returns the base, scope, and filter (in that order) joined by '?'.

AUTHOR

Michael Fowler <mfowler@cpan.org>

COPYRIGHT & LICENSE

Copyright 2009 Michael Fowler

This program is free software; you can redistribute it and/or modify it under the terms of either:

  • the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or

  • the Artistic License version 2.0.