[Chicago-talk] Test::More and Die

Steven Lembark lembark at wrkhors.com
Thu Nov 20 08:36:53 CST 2003



-- Jay Strauss <me at heyjay.com>

> I'm testing the waters with Test::*, I've re-read Andy's presentation,
> Test::Tutorial, and Test::More.
>
> So if I have a test that I want to carp or die, like I would normally if
> "really" wrong input was supplied, how can I perform that test (i.e.
> supply wrong data that would normally make my module error out) and
> continue with the other tests?

Same as always: eval it.

eval
{
	blah_blah_blah;

	die;
};

if( $@ )
{
	# something died...
}



--
Steven Lembark                               2930 W. Palmer
Workhorse Computing                       Chicago, IL 60647
                                            +1 888 359 3508



More information about the Chicago-talk mailing list