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.
die_on_fail(&?) (Score:1)
Have you consider using
die_on_fail {
# your tests go here.
}
?
life is short
Re: (Score:2)
Actually, I've been thinking about putting a failure handler there. I think it's a better solution:
That gives end users maximum flexibility.
Right now, though, I've discovered that the latest release, which incorporates Test::Deep, doesn't play well with Test::Class [cpan.org].
Re:die_on_fail(&?) (Score:1)
But that only gives you a global handler, with little knowledge of the test that failed.
The other suggestion is more local. And even lexical.
life is short
Reply to This
Parent
Re: (Score:2)
Actually, I'd be passing in the same information the current die handler gets, so you would have complete knowledge of the test which failed (well, as much as Test::Harness has). And it would be file scoped, not global.