Perl tends to like its packages defined before they're used.
Indeed, this is why the Perl 5 parser creates namespaces and installs subroutines into those name spaces at compilation time.
Except for code which creates an object in a BEGIN block before the parser has even read the class package declaration, this order does not matter. The OP's question is similar to:
ok( foo(), 10, 'foo() should return value of $bar' ); my $bar = 10; sub foo { return $bar }
In reply to Re^2: Inheritance in Perl5
by chromatic
in thread Inheritance in Perl5
by tamaguchi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |