Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Testing my carpingby nefigah (Monk) |
on Mar 15, 2008 at 07:43 UTC ( [id://674341]=perlquestion: print w/replies, xml ) | Need Help?? |
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! I'm a peripheral visionary... I can see into the future, but just way off to the side.
Back to
Seekers of Perl Wisdom
|
|