Is there a way to avoid having to declare %tests and then assign to %tests on another line?In a word 'no', or at least, not using lexicals. You could just use a package var however
Or perhapsour %tests = ( ... ); ## or the more compatible, less line lean use vars '%tests'; %tests = ( ... );
use Test::More tests => do { ... };
_________
broquaint
In reply to Re: BEGIN, strict, and variable assignment
by broquaint
in thread BEGIN, strict, and variable assignment
by dragonchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |