On Mon May 10 11:26:15 2010, paul@city-fan.org wrote:
Show quoted text> After upgrading from PPI 1.210 to 1.212, t/20_policies.t fails:
>
> # Failed test 'NamingConventions::Capitalization - line 4 - Basic
Passes'
Show quoted text> # at t/20_policies.t line 169.
> # got: '1'
> # expected: '0'
> # Violation found: : Package "Acme::12345" does not start with a upper
> case letter at line 17, column 1. See pages 45,46 of PBP. (package
> Acme::12345;)
> # Looks like you failed 1 test of 2361.
> t/20_policies.t ...................................
> Dubious, test returned 1 (wstat 256, 0x100)
> Failed 1/2361 subtests
> (2 TODO tests unexpectedly succeeded)
>
> I suspect that this may be related to the fix for RT#44862 (PPI cannot
> parse "package Foo::100;" correctly).
I share your suspicion, since PPI 1.210 incorrectly parsed the package
name as 'Foo::', followed by the number 100. This would hide the 100
from Perl::Critic.
This appears to have been fixed on March 14 2010, in SVN commit 3783.
There is no production version of Perl::Critic containing this fix, but
1.105_03 appears to have it. This release also incorporates other
patches, and some new (or at least different) dependencies.
The fix essentially allows digits as the starting characters in both the
:starts_with_lower and :starts_with_upper capitalization schemes.
The CPAN testers have reported a bunch of failures in Build.PL with
1.105_03. If it does not work for you, maybe Makefile.PL will.
Another way to get there is to apply the attached patch to Perl::Critic
1.105.