Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Test::OpenLDAP(3)     User Contributed Perl Documentation    Test::OpenLDAP(3)

NAME
       Test::OpenLDAP -	Creates	a temporary instance of	OpenLDAP's slapd
       daemon to run tests against.

VERSION
       Version 0.04

SYNOPSIS
       This module allows easy creation	and tear down of a OpenLDAP slapd
       instance.  When the variable goes out of	scope, the slapd instance is
       torn down and the file system objects it	relies on are removed.

	 my $slapd = Test::OpenLDAP->new(); # Test::OpenLDAP->new({ suffix => 'dc=foobar,dc=com' });

	 my $ldap = Net::LDAP->new($slapd->uri()) or Carp::croak("Failed to connect:$@");

	 my $mesg = $ldap->bind($slapd->admin_user(), password => $slapd->admin_password());

	 ... add / modify / search entries

	 $slapd->stop();

	 $slapd->start();

	 $slapd->DESTROY();

SUBROUTINES/METHODS
   new
       This method initialises and starts an OpenLDAP slapd instance,
       listening on a unix socket.  It then creates an admin user and password
       and returns the slapd instance to the user.  The	method accepts a hash
       parameter of configuration options.  The	only option it accepts at the
       moment is the 'suffix' option.

   skip
       This method allows the user to skip tests requiring Test::OpenLDAP by
       checking	to see if the slapd binary exists AND that the OS uses fork
       for process control.

   start
       This methods starts the slapd process

   start
       This method stops the slapd process

   uri
       This method gives the uri for the test code to connect to via a
       Net::LDAP->new()	call.

   suffix
       This method gives the dn	used as	the suffix for the slapd database.

   admin_user
       This method gives the admin user	name for the slapd database.

   admin_password
       This method gives the admin password for	the slapd database.

AUTHOR
       David Dick, "<ddick at cpan.org>"

BUGS
       Please report any bugs or feature requests to "bug-test-openldap	at
       rt.cpan.org", or	through	the web	interface at
       <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-OpenLDAP>.	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 Test::OpenLDAP

       You can also look for information at:

       o   RT: CPAN's request tracker (report bugs here)

	   <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-OpenLDAP>

       o   AnnoCPAN: Annotated CPAN documentation

	   <http://annocpan.org/dist/Test-OpenLDAP>

       o   CPAN	Ratings

	   <http://cpanratings.perl.org/d/Test-OpenLDAP>

       o   Search CPAN

	   <http://search.cpan.org/dist/Test-OpenLDAP/>

ACKNOWLEDGEMENTS
LICENSE	AND COPYRIGHT
       Copyright 2013 David Dick.

       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;	or the Artistic	License.

       See http://dev.perl.org/licenses/ for more information.

perl v5.24.1			  2017-07-03		     Test::OpenLDAP(3)

NAME | VERSION | SYNOPSIS | SUBROUTINES/METHODS | AUTHOR | BUGS | SUPPORT | ACKNOWLEDGEMENTS | LICENSE AND COPYRIGHT

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Test::OpenLDAP&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help