I am pretty sure. The XYZ module is structured as follows:
#!/usr/bin/perl
package XYZ;
use warnings;
use strict;
use Pod::Usage;
{
my $PrivateLexicalData;
sub do_something_useful {
...
}
} # End of private lexial scope
sub test {
do_something_useful(3) == 2 or die;
print "Tests complete\n."
exit(0);
}
if (not defined caller()) {
scalar @ARGV == 0 and pod2usage();
grep { m/-test/i } @ARGV and test();
}
1;
=head1 NAME
...