in reply to Modules containing test code in the same file

package Foo; ... return 1 if caller; package main; my $test = Foo->new(...); ...

Examine what is said, not who speaks.
Silence betokens consent.
Love the truth but pardon error.