... my $mod = 'Some::Package::Name'; my $m = 'method_tested_in_this_test_file'; # testA { my $o = $mod->new; is $o->$m($arg), 1, "return val of $m with arg $arg ok"; ... } # testB { my $o = $mod->new; is eval {$o->$m('blah'); 1}, undef, "$m croaks if sent in 'blah'"; like $@, qr/idiot!/, "...and error message is sane"; ... } ...