From 1a296183db94d2cdee75a53f8dc70186ad4c1c09 Mon Sep 17 00:00:00 2001 From: "leif%ogre.com" Date: Wed, 5 Jan 2005 03:08:13 +0000 Subject: [PATCH] * Fixes for build process on "broken" installation, where NSPR libraries are missing even when prldap libraries are available. * Changed all invocations of new to use the class method. git-svn-id: svn://10.0.0.236/branches/devel-branch-1_4_2@167287 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/directory/perldap/ChangeLog | 13 +++++++++++++ mozilla/directory/perldap/Conn.pm | 16 ++++++++-------- mozilla/directory/perldap/Entry.pm | 4 ++-- mozilla/directory/perldap/LDIF.pm | 14 +++++++------- mozilla/directory/perldap/Makefile.PL | 10 +++++++--- mozilla/directory/perldap/Utils.pm | 4 ++-- mozilla/directory/perldap/examples/ChangeLog | 5 +++++ .../perldap/examples/changes2ldif.pl | 4 ++-- .../directory/perldap/examples/ldappasswd.pl | 4 ++-- mozilla/directory/perldap/examples/lfinger.pl | 4 ++-- mozilla/directory/perldap/examples/modattr.pl | 4 ++-- mozilla/directory/perldap/examples/monitor.pl | 4 ++-- .../directory/perldap/examples/psoftsync.pl | 8 ++++---- mozilla/directory/perldap/examples/qsearch.pl | 4 ++-- .../directory/perldap/examples/rand_mods.pl | 4 ++-- mozilla/directory/perldap/examples/rename.pl | 4 ++-- mozilla/directory/perldap/examples/rmentry.pl | 4 ++-- mozilla/directory/perldap/examples/tabdump.pl | 4 ++-- mozilla/directory/perldap/t/ChangeLog | 6 ++++++ mozilla/directory/perldap/t/conn.pl | Bin 8398 -> 8401 bytes mozilla/directory/perldap/t/entry.pl | 6 +++--- 21 files changed, 77 insertions(+), 49 deletions(-) diff --git a/mozilla/directory/perldap/ChangeLog b/mozilla/directory/perldap/ChangeLog index 4b0bc3e4481..c4c36624afa 100644 --- a/mozilla/directory/perldap/ChangeLog +++ b/mozilla/directory/perldap/ChangeLog @@ -1,3 +1,16 @@ +2005-01-04 Leif Hedstrom + + * LDIF.pm: Changed all calls to new to use the class method directly. + + * Utils.pm: Changed all calls to new to use the class method directly. + + * Entry.pm: Changed all calls to new to use the class method directly. + + * Conn.pm: Changed all calls to new to use the class method directly. + + * Makefile.PL: Fixes for missing NSPR libraries, even though the prldap + libraries are available... + 2004-12-28 Leif Hedstrom * Conn.pm (new): Added the entryclass argument. diff --git a/mozilla/directory/perldap/Conn.pm b/mozilla/directory/perldap/Conn.pm index a8746091d20..573deadfba4 100644 --- a/mozilla/directory/perldap/Conn.pm +++ b/mozilla/directory/perldap/Conn.pm @@ -1,5 +1,5 @@ ############################################################################# -# $Id: Conn.pm,v 1.24.2.9 2004-12-28 23:33:11 leif%ogre.com Exp $ +# $Id: Conn.pm,v 1.24.2.10 2005-01-05 03:08:12 leif%ogre.com Exp $ # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (the "License"); you may not use this file except in @@ -185,7 +185,7 @@ sub newEntry if (ref $self) { $entry = $self->{"entryclass"}->new(); } else { - $entry = new Mozilla::LDAP::Entry; + $entry = Mozilla::LDAP::Entry->new(); } $entry->setDN($dn) if (defined($dn) && $dn ne ""); @@ -1086,7 +1086,7 @@ Before you can do anything with PerLDAP, you'll need to instantiate at least one Mozilla::LDAP::Conn object, and connect it to an LDAP server. As you probably guessed already, this is done with the B method: - $conn = new Mozilla::LDAP::Conn("ldap", "389", $bind, $pswd, $cert, $ver); + $conn = Mozilla::LDAP::Conn->new("ldap", "389", $bind, $pswd, $cert, $ver); die "Couldn't connect to LDAP server ldap" unless $conn; The arguments are: Host name, port number, and optionally a bind-DN, it's @@ -1102,7 +1102,7 @@ providing each individual argument, you can provide one hash array (actually, a pointer to a hash). For example: %ld = Mozilla::LDAP::Utils::ldapArgs(); - $conn = new Mozilla::LDAP::Conn(\%ld); + $conn = Mozilla::LDAP::Conn->new(\%ld); The components of the hash are: @@ -1174,7 +1174,7 @@ requires indexes to perform reasonably well. Ok, now we are prepared to actually do a real search on the LDAP server: $base = "o=netscape.com"; - $conn = new Mozilla::LDAP::Conn("ldap", "389", "", ""); die "No LDAP + $conn = Mozilla::LDAP::Conn->new("ldap", "389", "", ""); die "No LDAP connection" unless $conn; $entry = $conn->search($base, "subtree", "(uid=leif)"); @@ -1261,7 +1261,7 @@ new entry, the first thing to set it it's DN, like alternatively you can still use the B method on the Entry class, like - $entry = new Mozilla::LDAP::Entry; + $entry = Mozilla::LDAP::Entry->new(); You should not do this for an existing LDAP entry, changing the RDN (or DN) for such an entry must be done with B. To populate (or @@ -1397,7 +1397,7 @@ authentication method (i.e. with a password). A typical usage could be something like %ld = Mozilla::LDAP::Utils::ldapArgs(); - $conn = new Mozilla::LDAP::Conn(\%ld); + $conn = Mozilla::LDAP::Conn->new(\%ld); Also, remember that if you use SSL, the port is (usually) 636. @@ -1459,7 +1459,7 @@ example: $user = "leif"; $password = "secret"; - $conn = new Mozilla::LDAP::Conn($host, $port); # Anonymous bind + $conn = Mozilla::LDAP::Conn->new($host, $port); # Anonymous bind die "Could't connect to LDAP server $host" unless $conn; $entry = $conn->search($base, $scope, "(uid=$user)", 0, (uid)); diff --git a/mozilla/directory/perldap/Entry.pm b/mozilla/directory/perldap/Entry.pm index ffde1b4c1bf..4583ec65650 100644 --- a/mozilla/directory/perldap/Entry.pm +++ b/mozilla/directory/perldap/Entry.pm @@ -1,5 +1,5 @@ ############################################################################# -# $Id: Entry.pm,v 1.13.2.5 2004-11-02 18:22:15 leif%ogre.com Exp $ +# $Id: Entry.pm,v 1.13.2.6 2005-01-05 03:08:12 leif%ogre.com Exp $ # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (the "License"); you may not use this file except in @@ -1069,7 +1069,7 @@ directly. Failing to do so may actually break the functionality. To create a completely new entry, use the B method, for instance - $entry = new Mozilla::LDAP::Entry() + $entry = Mozilla::LDAP::Entry->new() $entry->setDN("uid=leif,ou=people,dc=netscape,dc=com"); $entry->{objectclass} = [ "top", "person", "inetOrgPerson" ]; $entry->addValue("cn", "Leif Hedstrom"); diff --git a/mozilla/directory/perldap/LDIF.pm b/mozilla/directory/perldap/LDIF.pm index 583945550e1..f923e07d16c 100644 --- a/mozilla/directory/perldap/LDIF.pm +++ b/mozilla/directory/perldap/LDIF.pm @@ -1,5 +1,5 @@ ############################################################################# -# $Id: LDIF.pm,v 1.8.2.1 2003-10-15 19:14:51 leif%ogre.com Exp $ +# $Id: LDIF.pm,v 1.8.2.2 2005-01-05 03:08:12 leif%ogre.com Exp $ # # # The contents of this file are subject to the Netscape Public @@ -775,14 +775,14 @@ Mozilla::LDAP::LDIF - read or write LDIF (LDAP Data Interchange Format) sort_attributes references enlist_values delist_values read_v1 read_v0 read_file_URL_or_name); - $ldif = new Mozilla::LDAP::LDIF (*FILEHANDLE, \&read_reference, $comments); + $ldif = Mozilla::LDAP::LDIF->new(*FILEHANDLE, \&read_reference, $comments); @record = get $ldif; @records = get $ldif ($maximum_number); $entry = set_Entry (\entry, \@record); $entry = readOneEntry $ldif; @entries = readEntries $ldif ($maximum_number); - $ldif = new Mozilla::LDAP::LDIF (*FILEHANDLE, $options); + $ldif = Mozilla::LDAP::LDIF->new(*FILEHANDLE, $options); $success = put $ldif (@record); $success = put $ldif (\@record, \object ...); $success = writeOneEntry $ldif (\entry); @@ -990,7 +990,7 @@ Return false if the file can't be read. =over 4 -=item B Mozilla::LDAP::LDIF (*FILEHANDLE, $options) +=item Mozilla::LDAP::LDIF->B(*FILEHANDLE, $options) Create and return an object used to write LDIF to the given file. $options are described below. @@ -1222,14 +1222,14 @@ to pass it only a single record. use Mozilla::LDAP::LDIF qw(read_file_URL_or_name); - $in = new Mozilla::LDAP::LDIF (*STDIN, \&read_file_URL_or_name); - $out = new Mozilla::LDAP::LDIF (*STDOUT, 78); + $in = Mozilla::LDAP::LDIF->new(*STDIN, \&read_file_URL_or_name); + $out = Mozilla::LDAP::LDIF->new(*STDOUT, 78); @records = get $in (undef); # read to end of file (^D) put $out (@records); use Mozilla::LDAP::Conn(); - $conn = new Mozilla::LDAP::Conn (...); + $conn = Mozilla::LDAP::Conn->new(...); while ($entry = readOneEntry $in) { add $conn ($entry); } diff --git a/mozilla/directory/perldap/Makefile.PL b/mozilla/directory/perldap/Makefile.PL index 26525157433..bb0b4f82e68 100644 --- a/mozilla/directory/perldap/Makefile.PL +++ b/mozilla/directory/perldap/Makefile.PL @@ -1,5 +1,5 @@ ############################################################################# -# $Id: Makefile.PL,v 1.16.2.4 2004-12-17 02:22:15 leif%ogre.com Exp $ +# $Id: Makefile.PL,v 1.16.2.5 2005-01-05 03:08:12 leif%ogre.com Exp $ # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (the "License"); you may not use this file except in @@ -120,8 +120,12 @@ if ($#nsprlib >= 0) print "$ldapsdk_pr\n"; } } -$pr_def = "-DPRLDAP" if ($ldapsdk_pr =~ /^y/i); -@nsprlib = () unless ($ldapsdk_pr =~ /^y/i); +if ($ldapsdk_pr =~ /^y/i) { + $pr_def = "-DPRLDAP" +} else { + @nsprlib = (); + @prldaplib = (); +} if ($#ldaplib < 0) { diff --git a/mozilla/directory/perldap/Utils.pm b/mozilla/directory/perldap/Utils.pm index ec43c14a8ab..f340717edb2 100644 --- a/mozilla/directory/perldap/Utils.pm +++ b/mozilla/directory/perldap/Utils.pm @@ -1,5 +1,5 @@ ############################################################################# -# $Id: Utils.pm,v 1.14.2.2 2004-10-14 02:05:42 leif%ogre.com Exp $ +# $Id: Utils.pm,v 1.14.2.3 2005-01-05 03:08:12 leif%ogre.com Exp $ # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (the "License"); you may not use this file except in @@ -287,7 +287,7 @@ sub userCredentials { my ($base) = $ld->{"base"} || $ld->{"root"}; - $conn = new Mozilla::LDAP::Conn($ld); + $conn = Mozilla::LDAP::Conn->new($ld); die "Could't connect to LDAP server " . $ld->{"host"} unless $conn; $search = "(&(objectclass=inetOrgPerson)(uid=$ENV{USER}))"; diff --git a/mozilla/directory/perldap/examples/ChangeLog b/mozilla/directory/perldap/examples/ChangeLog index be67ebbacc6..7e87e5b3f16 100644 --- a/mozilla/directory/perldap/examples/ChangeLog +++ b/mozilla/directory/perldap/examples/ChangeLog @@ -1,3 +1,8 @@ +2005-01-04 Leif Hedstrom + + * All examples: Changed all calls to new to use the class method + directly. + 2004-10-13 Leif Hedstrom * modattr.pl: Added a -i option, for case insentive "adds" to an diff --git a/mozilla/directory/perldap/examples/changes2ldif.pl b/mozilla/directory/perldap/examples/changes2ldif.pl index d78ef784493..25c4d27e9e7 100755 --- a/mozilla/directory/perldap/examples/changes2ldif.pl +++ b/mozilla/directory/perldap/examples/changes2ldif.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl5 ############################################################################# -# $Id: changes2ldif.pl,v 1.3.2.2 2004-10-14 02:05:43 leif%ogre.com Exp $ +# $Id: changes2ldif.pl,v 1.3.2.3 2005-01-05 03:08:12 leif%ogre.com Exp $ # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (the "License"); you may not use this file except in @@ -58,7 +58,7 @@ $ld{root} = "cn=changelog" if (!defined($ld{root}) || $ld{root} eq ""); ################################################################################# # Instantiate an LDAP object, which also binds to the LDAP server. # -$conn = new Mozilla::LDAP::Conn(\%ld); +$conn = Mozilla::LDAP::Conn->new(\%ld); die "Could't connect to LDAP server $ld{host}" unless $conn; diff --git a/mozilla/directory/perldap/examples/ldappasswd.pl b/mozilla/directory/perldap/examples/ldappasswd.pl index 5f6fc908a29..ac3c01b9a9e 100755 --- a/mozilla/directory/perldap/examples/ldappasswd.pl +++ b/mozilla/directory/perldap/examples/ldappasswd.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl5 ############################################################################# -# $Id: ldappasswd.pl,v 1.7.2.2 2004-10-14 02:05:43 leif%ogre.com Exp $ +# $Id: ldappasswd.pl,v 1.7.2.3 2005-01-05 03:08:12 leif%ogre.com Exp $ # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (the "License"); you may not use this file except in @@ -74,7 +74,7 @@ $crypted = Mozilla::LDAP::Utils::unixCrypt("$new"); # Now do all the searches, one by one. If there are no search criteria, we # will change the password for the user running the script. # -$conn = new Mozilla::LDAP::Conn(\%ld); +$conn = Mozilla::LDAP::Conn->new(\%ld); die "Could't connect to LDAP server $ld{host}" unless $conn; foreach $search ($#ARGV >= $[ ? @ARGV : $ld{bind}) diff --git a/mozilla/directory/perldap/examples/lfinger.pl b/mozilla/directory/perldap/examples/lfinger.pl index 7725e14b980..fd9b5551d35 100755 --- a/mozilla/directory/perldap/examples/lfinger.pl +++ b/mozilla/directory/perldap/examples/lfinger.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl5 ############################################################################# -# $Id: lfinger.pl,v 1.11.2.2 2004-10-14 02:05:43 leif%ogre.com Exp $ +# $Id: lfinger.pl,v 1.11.2.3 2005-01-05 03:08:12 leif%ogre.com Exp $ # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (the "License"); you may not use this file except in @@ -98,7 +98,7 @@ $user=$ARGV[$[]; ############################################################################# # Instantiate an LDAP object, which also binds to the LDAP server. # -$conn = new Mozilla::LDAP::Conn(\%ld); +$conn = Mozilla::LDAP::Conn->new(\%ld); die "Could't connect to LDAP server $ld{host}" unless $conn; diff --git a/mozilla/directory/perldap/examples/modattr.pl b/mozilla/directory/perldap/examples/modattr.pl index 243ee874f05..8b11e7049bd 100755 --- a/mozilla/directory/perldap/examples/modattr.pl +++ b/mozilla/directory/perldap/examples/modattr.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl5 ############################################################################# -# $Id: modattr.pl,v 1.9.2.2 2004-10-14 02:05:43 leif%ogre.com Exp $ +# $Id: modattr.pl,v 1.9.2.3 2005-01-05 03:08:12 leif%ogre.com Exp $ # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (the "License"); you may not use this file except in @@ -61,7 +61,7 @@ $nocase = (defined($opt_i) && $opt_i) ? 1 : 0; # Let's process the changes requested, and commit them unless the "-n" # option was given. # -$conn = new Mozilla::LDAP::Conn(\%ld); +$conn = Mozilla::LDAP::Conn->new(\%ld); die "Could't connect to LDAP server $ld{host}" unless $conn; $conn->setDefaultRebindProc($ld{bind}, $ld{pswd}); diff --git a/mozilla/directory/perldap/examples/monitor.pl b/mozilla/directory/perldap/examples/monitor.pl index 765095ba73f..b881c2bd5ed 100755 --- a/mozilla/directory/perldap/examples/monitor.pl +++ b/mozilla/directory/perldap/examples/monitor.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl5 ############################################################################# -# $Id: monitor.pl,v 1.3.2.2 2004-10-14 02:05:43 leif%ogre.com Exp $ +# $Id: monitor.pl,v 1.3.2.3 2005-01-05 03:08:12 leif%ogre.com Exp $ # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (the "License"); you may not use this file except in @@ -55,7 +55,7 @@ if (!getopts('b:h:D:p:w:P:V:')) # Instantiate an LDAP object, which also binds to the LDAP server, and then # do the simple search. # -$conn = new Mozilla::LDAP::Conn(\%ld); +$conn = Mozilla::LDAP::Conn->new(\%ld); die "Could't connect to LDAP server $ld{host}" unless $conn; $entry = $conn->search($ld{root}, "base", "objectclass=*"); diff --git a/mozilla/directory/perldap/examples/psoftsync.pl b/mozilla/directory/perldap/examples/psoftsync.pl index 206e9ef4e5b..172c1577508 100755 --- a/mozilla/directory/perldap/examples/psoftsync.pl +++ b/mozilla/directory/perldap/examples/psoftsync.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl5 ############################################################################# -# $Id: psoftsync.pl,v 1.6.2.2 2004-10-14 02:05:43 leif%ogre.com Exp $ +# $Id: psoftsync.pl,v 1.6.2.3 2005-01-05 03:08:12 leif%ogre.com Exp $ # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (the "License"); you may not use this file except in @@ -165,7 +165,7 @@ sub readDump next unless /$DELIMITER/; @info = split(/\s*%%\s*/); - $entry = new PsoftEntry($info[$[]); + $entry = PsoftEntry->new($info[$[]); foreach $attr (@ORDER) { $val = shift(@info); @@ -243,7 +243,7 @@ if (!getopts('nvMWb:h:D:p:s:w:P:V:')) %ld = Mozilla::LDAP::Utils::ldapArgs(); Mozilla::LDAP::Utils::userCredentials(\%ld) unless $opt_n; -$out = new Mail(); +$out = Mail->new(); if ($opt_M) { $out->set("to", $MAILTO); @@ -261,7 +261,7 @@ else # which also binds to the LDAP server. # %psoft = readDump(@ARGV[$[]); -$conn = new Mozilla::LDAP::Conn(\%ld); +$conn = Mozilla::LDAP::Conn->new(\%ld); die "Could't connect to LDAP server $ld{host}" unless $conn; diff --git a/mozilla/directory/perldap/examples/qsearch.pl b/mozilla/directory/perldap/examples/qsearch.pl index 2726c9dee0e..6cb9bbdd06a 100755 --- a/mozilla/directory/perldap/examples/qsearch.pl +++ b/mozilla/directory/perldap/examples/qsearch.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl5 ############################################################################# -# $Id: qsearch.pl,v 1.9.2.3 2004-10-14 22:20:45 leif%ogre.com Exp $ +# $Id: qsearch.pl,v 1.9.2.4 2005-01-05 03:08:12 leif%ogre.com Exp $ # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (the "License"); you may not use this file except in @@ -56,7 +56,7 @@ if (!getopts('b:h:D:p:s:w:P:V:')) ################################################################################# # Now do all the searches, one by one. # -$conn = new Mozilla::LDAP::Conn(\%ld); +$conn = Mozilla::LDAP::Conn->new(\%ld); die "Could't connect to LDAP server $ld{host}" unless $conn; foreach (@ARGV) diff --git a/mozilla/directory/perldap/examples/rand_mods.pl b/mozilla/directory/perldap/examples/rand_mods.pl index 18db0fece9a..7566c64e868 100755 --- a/mozilla/directory/perldap/examples/rand_mods.pl +++ b/mozilla/directory/perldap/examples/rand_mods.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl5 ################################################################################# -# $Id: rand_mods.pl,v 1.3.2.2 2004-10-14 02:05:43 leif%ogre.com Exp $ +# $Id: rand_mods.pl,v 1.3.2.3 2005-01-05 03:08:12 leif%ogre.com Exp $ # # The contents of this file are subject to the Netscape Public # License Version 1.1 (the "License"); you may not use this file @@ -73,7 +73,7 @@ if (!getopts('b:h:D:p:s:w:P:')) exit; } %ld = Mozilla::LDAP::Utils::ldapArgs(); -$conn = new Mozilla::LDAP::Conn(\%ld); +$conn = Mozilla::LDAP::Conn->new(\%ld); croak "Could't connect to LDAP server $ld{host}" unless $conn; diff --git a/mozilla/directory/perldap/examples/rename.pl b/mozilla/directory/perldap/examples/rename.pl index 77510abef59..a74b854230b 100755 --- a/mozilla/directory/perldap/examples/rename.pl +++ b/mozilla/directory/perldap/examples/rename.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl5 ############################################################################# -# $Id: rename.pl,v 1.5.2.2 2004-10-14 02:05:43 leif%ogre.com Exp $ +# $Id: rename.pl,v 1.5.2.3 2005-01-05 03:08:12 leif%ogre.com Exp $ # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (the "License"); you may not use this file except in @@ -62,7 +62,7 @@ if (($search eq "") || ($rdn eq "")) ############################################################################# # Instantiate an LDAP object, which also binds to the LDAP server. # -$conn = new Mozilla::LDAP::Conn(\%ld); +$conn = Mozilla::LDAP::Conn->new(\%ld); die "Could't connect to LDAP server $ld{host}" unless $conn; $key = "Y" if $opt_I; diff --git a/mozilla/directory/perldap/examples/rmentry.pl b/mozilla/directory/perldap/examples/rmentry.pl index f228ac99481..20b72a1e58b 100755 --- a/mozilla/directory/perldap/examples/rmentry.pl +++ b/mozilla/directory/perldap/examples/rmentry.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl5 ############################################################################# -# $Id: rmentry.pl,v 1.6.2.2 2004-10-14 02:05:43 leif%ogre.com Exp $ +# $Id: rmentry.pl,v 1.6.2.3 2005-01-05 03:08:12 leif%ogre.com Exp $ # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (the "License"); you may not use this file except in @@ -59,7 +59,7 @@ Mozilla::LDAP::Utils::userCredentials(\%ld) unless $opt_n; ################################################################################# # Do the search, and process all the entries. # -$conn = new Mozilla::LDAP::Conn(\%ld); +$conn = Mozilla::LDAP::Conn->new(\%ld); die "Could't connect to LDAP server $ld{host}" unless $conn; $key = "Y" if $opt_I; diff --git a/mozilla/directory/perldap/examples/tabdump.pl b/mozilla/directory/perldap/examples/tabdump.pl index 4c7aff5ed6f..ad9163ec534 100755 --- a/mozilla/directory/perldap/examples/tabdump.pl +++ b/mozilla/directory/perldap/examples/tabdump.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl5 ############################################################################# -# $Id: tabdump.pl,v 1.4.2.2 2004-10-14 02:05:43 leif%ogre.com Exp $ +# $Id: tabdump.pl,v 1.4.2.3 2005-01-05 03:08:12 leif%ogre.com Exp $ # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (the "License"); you may not use this file except in @@ -60,7 +60,7 @@ die "Need to specify a list of attributes and the search filter.\n" ################################################################################# # Do the searches, and produce the output. # -$conn = new Mozilla::LDAP::Conn(\%ld); +$conn = Mozilla::LDAP::Conn->new(\%ld); die "Could't connect to LDAP server $ld{host}" unless $conn; @attr = split(/,/, $attributes); diff --git a/mozilla/directory/perldap/t/ChangeLog b/mozilla/directory/perldap/t/ChangeLog index 3c297a16dde..0069f157cbc 100644 --- a/mozilla/directory/perldap/t/ChangeLog +++ b/mozilla/directory/perldap/t/ChangeLog @@ -1,3 +1,9 @@ +2005-01-04 Leif Hedstrom + + * entry.pl: Changed all calls to new to use the class method directly. + + * conn.pl: Changed all calls to new to use the class method directly. + 1999-08-06 Leif Hedstrom * conn.pl: Added support for browse() and compare(). diff --git a/mozilla/directory/perldap/t/conn.pl b/mozilla/directory/perldap/t/conn.pl index b41ece44cb4b07f0a519854257ad5bbba4cb0715..6152bc657045fb165f7002395e6f9201e9b4bc15 100755 GIT binary patch delta 58 zcmX@-c+qh}nW&M1k%57!u7RPhfvJLlv6X>^m7(#*ZavP)4|ydfU*KE{qBr+&*$ROf J4`kjk0{|LK6Tkof delta 118 zcmccUc+PP`nW&+Hk%57UuAzahp{as_ft8WDm7&qbZaq%%ywq|9-~6h~oSZ}}D<2of d04po!{Jgx$7de;WlH1(JWh;bJ^0CZ2W&n=_CdU8( diff --git a/mozilla/directory/perldap/t/entry.pl b/mozilla/directory/perldap/t/entry.pl index d9fa68d5a6c..0df206b9fd2 100755 --- a/mozilla/directory/perldap/t/entry.pl +++ b/mozilla/directory/perldap/t/entry.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl5 ############################################################################# -# $Id: entry.pl,v 1.3.2.2 2004-10-19 05:53:42 leif%ogre.com Exp $ +# $Id: entry.pl,v 1.3.2.3 2005-01-05 03:08:13 leif%ogre.com Exp $ # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (the "License"); you may not use this file except in @@ -72,7 +72,7 @@ sub getConn { if (!defined($main::mainConn)) { - $main::mainConn = new Mozilla::LDAP::Conn(\%main::ld); + $main::mainConn = Mozilla::LDAP::Conn->new(\%main::ld); die "Could't connect to LDAP server $main::ld{host}" unless $main::mainConn; } @@ -80,7 +80,7 @@ sub getConn } else { - $conn = new Mozilla::LDAP::Conn(\%main::ld); + $conn = Mozilla::LDAP::Conn->new(\%main::ld); die "Could't connect to LDAP server $main::ld{host}" unless $conn; }