Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Can you invoke it directly in the test script as &{$SIG{__DIE__}} and test accordingly from there?
Also ditto on the above .. we started using Devel::Cover recently at work and besides being very cool in itself, is very great thing in terms of forcing you to really know your own code in order to write thorough test coverage for it. On more than one occaison has made me rethink/rework code, and also revealed hidden bugs. As for coverage --> 100%, for me it is also usually the error conditions (e.g. </c>$dbh->prepare() or do { ... }</c>) that are the holes.. and while 100% isn't strictly necessary, it is nice feeling to get a completely green board ;) As for another work around (this might not be possible depending on what the function actually does) for one of xdg's points, this might work in some cases:
In reply to Re^2: TDD with Coverage Analysis. Wow.
by davidrw
|
|