/[A3C]/bin/import-ldap.pl
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 /bin/import-ldap.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 42 - (hide annotations)
Sun Mar 30 16:58:21 2008 UTC (16 years ago) by dpavlin
Original Path: bin/ldap.pl
File MIME type: text/plain
File size: 417 byte(s)
- move all LDAP-related logic in A3C::LDAP
- remove logic to link User and Organization
- ldap search base is now configurable in config.yml
1 dpavlin 5 #!/usr/bin/perl
2    
3     use warnings;
4     use strict;
5    
6     use lib 'lib';
7    
8     use Jifty;
9 dpavlin 36 use A3C::LDAP;
10 dpavlin 7 use Data::Dump qw/dump/;
11 dpavlin 22 use Getopt::Long;
12 dpavlin 5
13     BEGIN { Jifty->new; };
14    
15 dpavlin 30 my $limit = 100;
16 dpavlin 22 GetOptions(
17     'limit=i', => \$limit,
18     );
19    
20 dpavlin 42 my $ldap = A3C::LDAP->new;
21 dpavlin 5
22 dpavlin 42 foreach my $model ( qw/Organization User/ ) {
23     my $collection = $ldap->collection( $model, $limit );
24     Jifty->log->info( "found ", $collection->count, " entries for $model" );
25 dpavlin 5 }
26    

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26