Hi everyone,
I have a small problem with the parsing a wrong or inexistant schema
file. It seems the parse() method does not return false, neither the
error() method return anything. dump() or all_*() methods return
nothing as they should. Everything works fine on a syntactically good
file.
Am I doing something wrong?
my $file = "junk"; # or syntactically invalid file
my $schema = Net::LDAP::Schema->new;
# never dies
$schema->parse ( "$file" ) or die "$schema->error in $file";
$schema->error; # returns nothing
$schema->dump;
my @ats = $schema->all_attributes();
my @ocs = $schema->all_objectclasses();
print "- Attributes: ";
for my $href ( @ats ) {
my $att = $href->{'name'};
print "$att";
}
print "- Objectclasses: ";
for my $href ( @ocs ) {
my $att = $href->{'name'};
print "$att";
}
--
Claude