Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Datasource
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7112
Modified Files:
LDAP.pm
Log Message:
don't bring in Net::LDAP until we actually need to
Index: LDAP.pm
===================================================================
RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Datasource/LDAP.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** LDAP.pm 19 Feb 2005 04:27:07 -0000 1.9
--- LDAP.pm 23 Feb 2005 02:03:53 -0000 1.10
***************
*** 5,9 ****
use strict;
use Log::Log4perl qw( get_logger );
- use Net::LDAP qw();
use OpenInteract2::Constants qw( :log );
use OpenInteract2::Context qw( CTX );
--- 5,8 ----
***************
*** 13,16 ****
--- 12,16 ----
my ( $log );
+ my $REQUIRED = 0;
use constant LDAP_PORT => 389;
***************
*** 21,24 ****
--- 21,27 ----
sub connect {
my ( $class, $ds_name, $ds_info ) = @_;
+ unless ( $REQUIRED ) {
+ require Net::LDAP; $REQUIRED++;
+ }
$log ||= get_logger( LOG_DS );
unless ( ref $ds_info ) {
|