develooper Front page | perl.module-authors | Postings from January 2010

Re: satiating cpantesters

Thread Previous | Thread Next
From:
David Cantrell
Date:
January 6, 2010 03:48
Subject:
Re: satiating cpantesters
Message ID:
20100106114823.GA23282@bytemark.barnyard.co.uk
On Wed, Dec 16, 2009 at 10:53:22AM -0800, Eric Wilhelm wrote:
> # from David Cantrell
> >Mmmm, more special cases.  From a user's (ie, a module author's) point
> >of view, isn't it easier to remember "exit(0)" than to remember
> > exactly what message to spit out?
> Easier to remember, maybe.  But the challenge isn't memory (we usually 
> just look things up, right?), it's education.  If you have to educate 
> about the unnatural exit(0) *and* that makes the code clunky, it would 
> seem like a better idea to educate about something that isn't so 
> creaky.

Exiting with a 0 status would seem to be the least clunky solution.
exit(0) means "Stop now and claim to have succeeded".  It means that
in every perl program and, indeed, every non-perl program.

Better to educate them about something clean and easy to remember than
to educate them that there's a special case for this (for which they'll
have to either remember an exact string or look it up every time).

-- 
David Cantrell | A machine for turning tea into grumpiness

    If you have received this email in error, please add some nutmeg
    and egg whites, whisk, and place in a warm oven for 40 minutes.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About