Update of /cvsroot/perl-ldap/sasl/lib/Authen
In directory usw-pr-cvs1:/tmp/cvs-serv24316/lib/Authen
Modified Files:
SASL.pm
Log Message:
Add some tests
Index: SASL.pm
===================================================================
RCS file: /cvsroot/perl-ldap/sasl/lib/Authen/SASL.pm,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- SASL.pm 2002/01/24 12:04:16 1.1.1.1
+++ SASL.pm 2002/01/28 19:52:25 1.2
@@ -5,11 +5,16 @@
package Authen::SASL;
use strict;
-use vars qw($VERSION);
+use vars qw($VERSION @Plugins);
use Carp;
$VERSION = "2.00";
+@Plugins = qw(
+ Authen::SASL::Cyrus
+ Authen::SASL::Perl
+);
+
sub new {
my $pkg = shift;
my %opt = ((@_ % 2 ? 'mechanism' : ()), @_);
@@ -53,8 +58,7 @@
sub client_new { # $self, $service, $host, $secflags
my $self = shift;
- foreach my $plugin (qw(Cyrus Perl)) {
- my $pkg = __PACKAGE__ . "::$plugin";
+ foreach my $pkg (@Plugins) {
if (eval "require $pkg") {
return ($self->{conn} = $pkg->client_new($self, @_));
}
|