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

NAME

Catalyst::Model::LDAP - LDAP model class for Catalyst

SYNOPSIS

  # Use the Catalyst helper
  script/myapp_create.pl model People LDAP ldap.ufl.edu ou=People,dc=ufl,dc=edu

  # lib/MyApp/Model/People.pm
  package MyApp::Model::People;

  use base 'Catalyst::Model::LDAP';

  __PACKAGE__->config(
      host         => 'ldap.ufl.edu',
      base         => 'ou=People,dc=ufl,dc=edu',
      dn           => '',
      password     => '',
      options      => {},  # Options passed to all Net::LDAP methods
                           # (e.g. SASL for bind or sizelimit for
                           # search)
  );

  1;

  # As object method
  $c->comp('M::People')->search('(sn=TEST)');

  # As class method
  MyApp::Model::People->search('(sn=TEST)');

DESCRIPTION

This is the Net::LDAP model class for Catalyst. It is nothing more than a simple wrapper for Net::LDAP.

METHODS

new

Create a new Catalyst LDAP model component.

Search the directory using a given filter. Returns an arrayref containing the matching entries (if any).

_execute

Bind to the server and execute the specified Net::LDAP method, passing in the specified arguments.

_client

Return an LDAP connection, bound to the server using the current configuration.

SEE ALSO

TODO

  • Add other LDAP methods.

AUTHOR

Daniel Westermann-Clark <danieltwc@cpan.org>

Based on work started by <salih@ip-plus.net> on the Catalyst mailing list:

http://lists.rawmode.org/pipermail/catalyst/2005-June/000712.html

LICENSE

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