Subject: | False Positive Package Declaration |
Date: | Sun, 11 Sep 2011 17:51:46 +1000 |
To: | <bug-perl-critic [...] rt.cpan.org> |
From: | "Gerard Stainsby" <gstainsb [...] bigpond.net.au> |
Environment:
MS Windows Vista X64
ActiveState Perl v5.14.1 build 1401 (X64) perlcritic version 1.116
This is an issue only for OSs with case-insensitive file-systems...
if perlcritic is called specifying a module name using the wrong case, it
complains 'Package declaration must match filename at...', even if the
Package declaration in the module is actually correct.
Here's an example using a standard module:
cd /bin/perl/lib
perlcritic file/glob.pm
... generates the warning.
if correctly invoked:
perlcritic File/Glob.pm
... no warning is generated.
I suggest that perlcritic should query the filesystem, rather than rely on
the command line arguments to decide whether the package statement is
correct.
Cheers,
Gerard