- Moved everything from @EXPORT to @EXPORT_OK and %EXPORT_TAGS

- Removed references to 'donley@cig.mot.com' substituted 'donley@wwa.com'
This commit is contained in:
clayton 1998-07-24 19:01:51 +00:00
Родитель d1cf32dce8
Коммит cdbd4dce21
5 изменённых файлов: 60 добавлений и 26 удалений

Просмотреть файл

@ -1,5 +1,5 @@
#############################################################################
# $Id: API.pm,v 1.3 1998/07/23 11:05:51 leif Exp $
# $Id: API.pm,v 1.4 1998/07/24 19:01:47 clayton Exp $
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (the "License"); you may not use this file except in
@ -28,7 +28,7 @@ package Mozilla::LDAP::API;
use strict;
use Carp;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use vars qw($VERSION @ISA %EXPORT_TAGS @EXPORT @EXPORT_OK $AUTOLOAD);
require Exporter;
require DynaLoader;
@ -38,9 +38,9 @@ require AutoLoader;
# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.
#@EXPORT
@EXPORT = qw(
%EXPORT_TAGS = (
constant=> [qw(
LDAPS_PORT
LDAP_ADMINLIMIT_EXCEEDED
LDAP_AFFECTS_MULTIPLE_DSAS
@ -199,7 +199,8 @@ require AutoLoader;
LDAP_VERSION1
LDAP_VERSION2
LDAP_VERSION3
LDAP_VERSION_MAX
LDAP_VERSION_MAX)],
api => [qw(
ldap_abandon ldap_add ldap_add_s ldap_ber_free ldap_build_filter
ldap_compare ldap_compare_s ldap_count_entries ldap_create_filter
ldap_delete ldap_delete_s ldap_dn2ufn ldap_err2string
@ -220,7 +221,8 @@ require AutoLoader;
ldap_set_option ldap_set_rebind_proc ldap_simple_bind
ldap_simple_bind_s ldap_sort_entries ldap_unbind ldap_unbind_s
ldap_url_parse ldap_url_search ldap_url_search_s ldap_url_search_st
ldap_version
ldap_version)],
apiv3 => [qw(
ldap_abandon_ext ldap_add_ext ldap_add_ext_s ldap_compare_ext
ldap_compare_ext_s ldap_control_free ldap_controls_count
ldap_controls_free ldap_count_messages ldap_count_references
@ -233,14 +235,23 @@ require AutoLoader;
ldap_parse_extended_result ldap_parse_reference ldap_parse_result
ldap_parse_sasl_bind_result ldap_parse_sort_control
ldap_parse_virtuallist_control ldap_rename ldap_rename_s
ldap_sasl_bind ldap_sasl_bind_s ldap_search_ext ldap_search_ext_s
ldap_sasl_bind ldap_sasl_bind_s ldap_search_ext ldap_search_ext_s)],
ssl => [qw(
ldapssl_client_init
ldapssl_enable_clientauth
ldapssl_clientauth_init
ldapssl_init
ldapssl_install_routines
ldapssl_install_routines)],
);
# Add Everything in %EXPORT_TAGS to @EXPORT_OK
@EXPORT_OK = ();
foreach my $EXP (keys %EXPORT_TAGS)
{
push @EXPORT_OK, @{$EXPORT_TAGS{$EXP}};
}
$VERSION = '0.90';
sub AUTOLOAD {

Просмотреть файл

@ -1,5 +1,5 @@
#############################################################################
# $Id: test.pl,v 1.3 1998/07/23 11:05:58 leif Exp $
# $Id: test.pl,v 1.4 1998/07/24 19:01:48 clayton Exp $
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (the "License"); you may not use this file except in
@ -32,7 +32,7 @@
BEGIN { $| = 1; print "1..8\n"; }
END {print "modinit - not ok\n" unless $loaded;}
use Mozilla::LDAP::API;
use Mozilla::LDAP::API qw(:constant :api :ssl);
$loaded = 1;
print "modinit - ok\n";
@ -87,10 +87,6 @@ if (ldap_search_s($ld,$BASEDN,LDAP_SCOPE_SUBTREE,$filter,$attrs,0,$result) != LD
}
print "search - ok\n";
$status = ldap_parse_result($ld,$result,$a,$b,$c,$d,$e,0);
print "parse - ok - $a:$b:$c:" . join(@{$d},":") . "\n";
##
## ldap_count_entries - Count Matched Entries
##

Просмотреть файл

@ -1,8 +1,35 @@
#!/usr/bin/perl -w
#############################################################################
# $Id: api.pl,v 1.2 1998/07/24 19:01:49 clayton Exp $
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# License for the specific language governing rights and limitations
# under the License.
#
# The Original Code is PerlDAP. The Initial Developer of the Original
# Code is Netscape Communications Corp. and Clayton Donley. Portions
# created by Netscape are Copyright (C) Netscape Communications
# Corp., portions created by Clayton Donley are Copyright (C) Clayton
# Donley. All Rights Reserved.
#
# Contributor(s):
#
# DESCRIPTION
# api.pl - Test all LDAPv2 API function
# Author: Clayton Donley <donley@wwa.com>
#
# Performs all API calls directly in order to test for possible issues
# on a particular platform.
#
#############################################################################
use Mozilla::LDAP::API;
use Mozilla::LDAP::API (:api :constant);
use strict;
my $BASE = "ou=Test,o=Motorola,c=US";

Просмотреть файл

@ -1,6 +1,6 @@
#!/usr/bin/perl
#############################################################################
# $Id: search.pl,v 1.1 1998/07/24 15:32:08 clayton Exp $
# $Id: search.pl,v 1.2 1998/07/24 19:01:50 clayton Exp $
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (the "License"); you may not use this file except in
@ -25,12 +25,12 @@
#
#############################################################################
use Mozilla::LDAP::API;
use Mozilla::LDAP::API (:api :constant);
use strict;
my $ldap_host = "ilms04.cig.mot.com";
my $BASEDN = "o=Motorola,c=US";
my $ldap_host = "localhost";
my $BASEDN = "o=Org,c=US";
my $filter = $ARGV[0];
my $attrs = [];

Просмотреть файл

@ -1,6 +1,6 @@
#!/usr/bin/perl -w
#############################################################################
# $Id: write.pl,v 1.1 1998/07/24 15:35:52 clayton Exp $
# $Id: write.pl,v 1.2 1998/07/24 19:01:51 clayton Exp $
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.0 (the "License"); you may not use this file except in
@ -21,8 +21,8 @@
# Contributor(s):
#
# DESCRIPTION
# testwrite.pl - Test of LDAP Modify Operations in Perl5
# Author: Clayton Donley <donley@cig.mot.com>
# write.pl - Test of LDAP Modify Operations in Perl5
# Author: Clayton Donley <donley@wwa.com>
#
# This utility is mostly to demonstrate all the write operations
# that can be done with LDAP through this PERL5 module.
@ -30,17 +30,17 @@
#############################################################################
use strict;
use Mozilla::LDAP::API;
use Mozilla::LDAP::API (:constant :api);
# This is the entry we will be adding. Do not use a pre-existing entry.
my $ENTRYDN = "cn=Test Guy, o=Motorola, c=US";
my $ENTRYDN = "cn=Test Guy, o=Org, c=US";
# This is the DN and password for an Administrator
my $ROOTDN = "cn=DSManager,o=Motorola,c=US";
my $ROOTDN = "cn=DSManager,o=Org,c=US";
my $ROOTPW = "";
my $ldap_server = "ilms04.cig.mot.com";
my $ldap_server = "localhost";
my $ld = ldap_init($ldap_server,LDAP_PORT);