in reply to Test::More subtest parameters
How do I pass parameters to the subtest?
I kinda think, if you think you need to do that, you're doing it wrong -- but you could do it
sub fudge { my( $name , $cb , $asbestos, @rest ) = @_; subtest $name, sub { $cb->($asbestos, @rest ); }; }
?Maybe (probably not) subtest itself has a syntax for doing this subtest $name, $callback, @args; ?
FWIW, I've never seen subtest in the wild, and I've seen a lot of tests
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Test::More subtest parameters
by tobyink (Canon) on Apr 17, 2013 at 10:23 UTC |