use strict; my %tests; BEGIN { %tests = ( # Stuff here ); } use Test::More tests => (keys(%tests) * 5 + 1); use_ok( Some::Class ); # Tests here
Is there a way to avoid having to declare %tests and then assign to %tests on another line?
------
We are the carpenters and bricklayers of the Information Age.
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
In reply to BEGIN, strict, and variable assignment by dragonchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |