html_cleanup branch: tools/docs/make_html_docs.pl fails one Perl::Critic test

James E Keenan jkeen at verizon.net
Wed Dec 15 02:34:34 UTC 2010


This, admittedly, is an edge case.

I was testing the html_cleanup branch tonight and, after getting PASS on 
'make test', proceeded to 'make codetest'.  I got one failure in 
t/codingstd/perlcritic.t:

   # Code before strictures are enabled at tools/docs/make_html_docs.pl 
line 25

The reason why code is appearing in this file before strictures are 
enabled is that strictures are never *explicitly* enabled in this 
program.  Instead, we have:

   use 5.12.0;

... which, IIRC, enables strictures by default.  But our Perl::Critic 
policy probably (haven't peered underneath the hood), probably expects 
and explicit

   use strict;

... and, in fact, adding that one line right after use 5.12.0 causes 
t/codingstd/perlcritic.t to PASS.

The question then arises, why are we requiring Perl 5.12 for this 
program.  AFAICT, there is no Perl 5.10 or 5.12 syntax in the program. 
The program does, however, use File::Path::make_path() which is from a 
version of File::Path not found as core in earlier Perls.  (The file 
uses JSON, but that's a non-core requirement.)

(Granted, I would love to be able to write Perl 5.12 code in Perl 
components of the Parrot distribution.  But that's a discussion for 
another day.)

So, I feel we either must make this program Perl 5.8.4-compliant or must 
modify our Perl::Critic policy to not look for 'use strict' if a program 
is running under Perl 5.12 or later.

Suggestions?

Thank you very much.
kid51



More information about the parrot-dev mailing list