in reply to Re^2: Preparing for my first CPAN submission
in thread Preparing for my first CPAN submission

All of those questions will be addressed by user requests.

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;

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^4: Preparing for my first CPAN submission
by ruzam (Curate) on Dec 16, 2007 at 21:06 UTC
    Thanks!

    That's exactly the kind of guidance I was hoping for.