Yup. That's the basic idea. A huge number of tests I write look like:
my $thing = eval { blort($value) }; ok( !$@, 'blort didn't blow up') || diag $@;
If I can, I like to populate a data structure with test specifics and then run a sub against the contents of that structure. One nice side affect is you can calculate plan tests => X. Ultimately, I'd like to be able to write tests in a config file.
In reply to Re^2: Ref to Method?
by pileofrogs
in thread Ref to Method?
by pileofrogs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |