/[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

Contents of /bin/import-ldap.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 44 - (show annotations)
Sun Mar 30 21:59:34 2008 UTC (16 years ago) by dpavlin
Original Path: bin/ldap.pl
File MIME type: text/plain
File size: 538 byte(s)
- removed limit for syncing
- specify model to sync from command line

1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5
6 use lib 'lib';
7
8 use Jifty;
9 use A3C::LDAP;
10 use Data::Dump qw/dump/;
11 use Getopt::Long;
12
13 BEGIN { Jifty->new; };
14
15 my $limit = 0;
16 my @models;
17 GetOptions(
18 'limit=i', => \$limit,
19 'model=s', => \@models,
20 );
21
22 @models = ( 'Organization' ) unless @models;
23
24 my $ldap = A3C::LDAP->new;
25
26 Jifty->log->info( 'syncing: ', join(',', @models) );
27
28 foreach my $model ( @models ) {
29 my $collection = $ldap->collection( $model, $limit );
30 Jifty->log->info( "found ", $collection->count, " entries for $model" );
31 }
32

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26