nefigah has asked for the wisdom of the Perl Monks concerning the following question:
Hello Brethren (and Sisteren!),
I'm going through my first-ever unit testing experience with my first-ever Perl OO module. So far so good, but a couple questions have arisen:
From what I can tell, carp and croak seem to be the way to do "exceptions," correct? (BTW, why the silly names?)
Assuming the above is true, what is the best way to go about testing if something is correctly croaking on invalid input? Should I put the eval blocks right there in the tests, or are there built-in functions that "catch" them? (I couldn't find anything about this in the perldoc testing tutorials or the Q&A here.)
Thanks!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Testing my carping
by tirwhan (Abbot) on Mar 15, 2008 at 09:50 UTC | |
Re: Testing my carping
by kyle (Abbot) on Mar 15, 2008 at 13:28 UTC | |
Re: Testing my carping
by hipowls (Curate) on Mar 15, 2008 at 08:46 UTC |