Update of /cvsroot/perl-ldap/ldap/lib/Net/LDAP
In directory sc8-pr-cvs1:/tmp/cvs-serv27619/lib/Net/LDAP
Modified Files:
Schema.pm
Log Message:
Return schema parse errors
Index: Schema.pm
===================================================================
RCS file: /cvsroot/perl-ldap/ldap/lib/Net/LDAP/Schema.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- Schema.pm 28 May 2002 07:57:45 -0000 1.15
+++ Schema.pm 6 May 2003 11:58:16 -0000 1.16
@@ -48,12 +48,12 @@
elsif (UNIVERSAL::isa($arg, 'Net::LDAP::Search')) {
unless ($entry = $arg->entry) {
$schema->{error} = 'Bad Argument';
- return undef;
+ return $schema;
}
}
else {
$schema->{error} = 'Bad Argument';
- return undef;
+ return $schema;
}
}
elsif( -f $arg ) {
@@ -62,12 +62,12 @@
$entry = $ldif->read();
unless( $entry ) {
$schema->{error} = "Cannot parse LDIF from file [$arg]";
- return undef;
+ return $schema;
}
}
else {
$schema->{error} = "Can't load schema from [$arg]: $!";
- return undef;
+ return $schema;
}
eval {
@@ -77,7 +77,7 @@
if ($@) {
$schema->{error} = $@;
- return undef;
+ return $schema;
}
return $schema;
|