Subject: | RequireFilenameMatchesPackage doesn't fire with shebang line |
perl -v: ActivePerl 5.10.0.1003 (perl v5.10.0)
Linux Fedora release 9 (Sulphur)
Using -mcriticism as a command-line wrapper has problems when there's
a shebang line.
Input file X.pm:
#===================
#!/usr/bin/env perl
package Y;
use strict;
use warnings;
1;
#===================
$ perl -mcriticism=harsh -cw X.pm
X.pm syntax OK
$ perlcritic --harsh X.pm
Package declaraion must match filename at line 3, column 1....
$
If I comment out the shebang line, I get the same
warning using -mcriticism.
I prefer to use criticism, because then I see problems
Perl-Critic doesn't catch.
fails to give the "Package declaration