Persistent::LDAPPersistent::LDAP is a persistent class implemented using a LDAP directory. | |
Download |
Persistent::LDAP Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- David Winters
- Publisher web site:
- http://search.cpan.org/~dwinters/Persistent-mSQL-0.50/lib/Persistent/mSQL.pm
Persistent::LDAP Tags
Persistent::LDAP Description
Persistent::LDAP is a persistent class implemented using a LDAP directory. Persistent::LDAP is a persistent class implemented using a LDAP directory.SYNOPSIS use Persistent::LDAP; use English; # import readable variable names like $EVAL_ERROR eval { ### in case an exception is thrown ### ### allocate a persistent object ### my $person = new Persistent::LDAP('localhost', 389, 'cn=Directory Manager', 'test1234', 'ou=Engineering,o=Big Snow Org,c=US'); ### declare attributes of the object ### $person->add_attribute('uid', 'ID', 'String'); $person->add_attribute('userpassword', 'Persistent', 'String'); $person->add_attribute('objectclass', 'Persistent', 'String'); $person->add_attribute('givenname', 'Persistent', 'String'); $person->add_attribute('sn', 'Persistent', 'String'); $person->add_attribute('cn', 'Persistent', 'String'); $person->add_attribute('mail', 'Persistent', 'String'); $person->add_attribute('telephonenumber', 'Persistent', 'String'); ### query the datastore for some objects ### $person->restore_where('& (objectclass=person)(mail=*bigsnow.org)', 'sn, givenname'); while ($person->restore_next()) { printf("name = %s, email = %sn", $person->givenname . ' ' . $person->sn, $person->mail); } }; if ($EVAL_ERROR) { ### catch those exceptions! ### print "An error occurred: $EVAL_ERRORn"; }ABSTRACTThis is a Persistent class that uses a LDAP directory to store and retrieve objects. This class can be instantiated directly or subclassed. The methods described below are unique to this class, and all other methods that are provided by this class are documented in the Persistent documentation. The Persistent documentation has a very thorough introduction to using the Persistent framework of classes. Requirements: · Perl
Persistent::LDAP Related Software