http://www.perlmonks.org?node_id=454355


in reply to Re: Testing failures: How to override print to make it fail?
in thread Testing failures: How to override print to make it fail?

I'm helping a workmate write his first ever tests for a new function he added to an existing module. Seeing that his new function had:

open ... or die ... print ... or die ...
I suggested it is good form to write tests for exceptional conditions ... then realized I had no idea how to do it. :-) BTW, Devel::Cover also nags you if you don't test the or die branches.