>>>>> "Peter" == Peter Marschall <[EMAIL PROTECTED]> writes:
[...]
>> - We may wonder if it should return undef after all, and how to use
>> error() then?
Peter> Well, you cannot have it both ways. When you want parse() to
Peter> return undef on error you cannot expect the result to be an
Peter> object in exactly this case.
[...]
I modified my testfile to a dazzling:
use strict;
use Net::LDAP::Schema;
my $schema = Net::LDAP::Schema->new;
$schema->parse( "foobar" )
or warn "Never printed";
my $r = $schema->parse( "foobar" );
warn "This is printed" if $schema->error();
And that returns what we want:
$ ./test1.pl
Never printed at ./test1.pl line 9.
This is printed at ./test1.pl line 13.
Tx for you help, Peter!
--
Claude