in reply to too much testing?
If you want a more elegant version, see Test::Exception. But keep in mind that because that's a CPAN module, not everyone may have it installed.eval { my $hashref = $foo->getDetails( PARAM_ONE => 1234); }; like $@, /missing PARAM_TWO/, "detect missing param 2";
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: too much testing?
by geektron (Curate) on Sep 30, 2005 at 19:19 UTC | |
by leriksen (Curate) on Oct 03, 2005 at 01:25 UTC | |
by geektron (Curate) on Oct 03, 2005 at 04:14 UTC | |
by leriksen (Curate) on Oct 03, 2005 at 06:35 UTC | |
by geektron (Curate) on Oct 03, 2005 at 08:04 UTC |