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

NAME

Net::LDAP::Class::Metadata - LDAP class metadata

SYNOPSIS

 package MyLDAPClass;
 use strict;
 use base qw( Net::LDAP::Class );
 
 __PACKAGE__->metadata->setup(
    base_dn             => 'dc=mycompany,dc=local',
    attributes          => [qw( name phone email )],
    unique_attributes   => [qw( email )],
 );
 
 1;

DESCRIPTION

Instances of this class hold all the attribute information for a Net::LDAP::Class-derived object.

METHODS

new( class => 'NetLDAPClassName' )

Returns a new instance. The class argument is required.

loader_class

Returns 'Net::LDAP::Class::Loader' by default.

setup( args )

Initialize the Metadata object.

args must be key/value pairs. The keys should be the names of methods, and the values will be set on those method names in the order given.

setup() will call the Net::LDAP::Class::MethodMaker make_methods() method to create accessor methods for all the attributes() on the class indicated in new().

clone

Returns a clone of the Metadata object. Uses Clone::clone().

for_class( class_name )

Returns a Metadata object for class_name. Used primarily by the metadata() method in Net::LDAP::Class.

attributes

Get/set the array ref of attributes for the class.

base_dn

Get/set the base DN for the class.

error

Get/set the current error message.

ldap

Get/set the internal Net::LDAP object.

object_classes

Get/set the object_classes to be used by the Loader. Ignored if you are not using Net::LDAP::Class::Loader.

unique_attributes

Get/set the array ref of unique attributes for the class. These are attributes which may be used to uniquely identify a LDAP entry.

AUTHOR

Peter Karman, <karman at cpan.org>

BUGS

Please report any bugs or feature requests to bug-net-ldap-class at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-LDAP-Class. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Net::LDAP::Class

You can also look for information at:

ACKNOWLEDGEMENTS

The Minnesota Supercomputing Institute http://www.msi.umn.edu/ sponsored the development of this software.

The idea and much of the code for this class was stolen directly from John Siracusa's Rose::DB::Object::Metadata module.

COPYRIGHT

Copyright 2008 by the Regents of the University of Minnesota. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Net::LDAP::Class, Rose::DB::Object