eval() catching exceptions seems more awkward to me.my $foo = MaybeADirectoryObject->new(@args) or die "No object: $!";
I would probably carp() instead of print in the constructor.
In reply to Re: Re: Should a constructor ever return undef?
by ctilmes
in thread Should a constructor ever return undef?
by tall_man
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |