/[A3C]/lib/A3C/LDAP.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /lib/A3C/LDAP.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 36 - (hide annotations)
Sun Mar 30 00:02:18 2008 UTC (15 years, 10 months ago) by dpavlin
File size: 585 byte(s)
move LDAP stuff in own package
1 dpavlin 36 package A3C::LDAP;
2    
3     use strict;
4     use warnings;
5    
6     use Net::LDAP;
7     use Data::Dump qw/dump/;
8     use base 'Jifty::Object';
9    
10     my $ldap_config = Jifty->config->app('LDAP');
11    
12     Jifty->log->debug( "config->app(LDAP) = ",dump( $ldap_config ) );
13    
14     my $ldap = Net::LDAP->new( $ldap_config->{Server} ) or die "$@";
15    
16     # an anonymous bind
17     #my $mesg = $ldap->bind;
18     my $mesg = $ldap->bind( $ldap_config->{DN}, password => $ldap_config->{Password} );
19    
20     Jifty->log->info("Connected to ", $ldap_config->{Server}, " with DN ", $ldap_config->{DN});
21    
22     sub search {
23     my $self = shift;
24    
25     return $ldap->search( @_ );
26     }
27    
28     1;

  ViewVC Help
Powered by ViewVC 1.1.26