--- bin/ldap.pl 2008/03/18 19:22:50 34 +++ bin/ldap.pl 2008/03/30 00:02:18 36 @@ -6,7 +6,7 @@ use lib 'lib'; use Jifty; -use Net::LDAP; +use A3C::LDAP; use Data::Dump qw/dump/; use Getopt::Long; @@ -17,19 +17,8 @@ 'limit=i', => \$limit, ); -my $ldap_config = Jifty->config->app('LDAP'); -Jifty->log->debug( "config->app(LDAP) = ",dump( $ldap_config ) ); - -my $ldap = Net::LDAP->new( $ldap_config->{Server} ) or die "$@"; - -# an anonymous bind -#my $mesg = $ldap->bind; -my $mesg = $ldap->bind( $ldap_config->{DN}, password => $ldap_config->{Password} ); - -Jifty->log->info("Connected to ", $ldap_config->{Server}, " with DN ", $ldap_config->{DN}); - # perform a search -$mesg = $ldap->search( +my $mesg = A3C::LDAP->search( base => "dc=skole,dc=hr", # filter => "(&(sn=Barr) (o=Texas Instruments))", filter => "(objectClass=hrEduPerson)",