in reply to Re^2: Preparing for my first CPAN submission
in thread Preparing for my first CPAN submission
As for the $errstr and errstr() stuff ... get rid of $errstr and make errstr() a class method. So, of the form:
sub errstr { my $self = shift; return $self->{errstr} if Scalar::Util::blessed $self; return $errstr; }
That allows for the possibility of multiple objects.
As for new() failure, the meme is this:
my $obj = CLASS->new( ... ) or die CLASS->errstr;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Preparing for my first CPAN submission
by ruzam (Curate) on Dec 16, 2007 at 21:06 UTC |