NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Write your own use_ok() but leave mine alone (Score:2)
I like to have use_ok() give me its answer then let me decide what to do with it. It always sucks to have side effects forced on you. You want to die (although you probably really want to bail_out), but maybe I want to do something else, like tell a pre-commit hook something, try to log an error message, or whatever. If you want to attach extra behaviour, make a use_ok_or_die().
I have use_ok() duplicated in several test files. That allows me to run just a single test file with those sanity checks. If you're talking about duplicating tests in the same file, that's probably a different story.
Reply to This