Perl::Critic / Test::Perl::Critic

Andy Armstrong andy at hexten.net
Wed Aug 9 18:43:34 BST 2006


Is anyone using Test::Perl::Critic successfully? I'm working on a  
module that I created using Module::Starter::PBP (for giggles). It  
generates a test t/perlcritic.t thus:

#!perl

if (!require Test::Perl::Critic) {
     Test::More::plan(
         skip_all => "Test::Perl::Critic required for testing PBP  
compliance"
     );
}

Test::Perl::Critic::all_critic_ok();

that fails make test like this:

t/perlcritic......NOK 4
#   Failed test 'blib/lib/GPS/Babel/Data.pm'
#   in /usr/local/share/perl/5.8.7/Test/Perl/Critic.pm at line 98.
#
# Perl::Critic found these violations in 'blib/lib/GPS/Babel/Data.pm':
Use of uninitialized value in substitution (s///) at /usr/local/share/ 
perl/5.8.7/Test/Perl/Critic.pm line 77.
Use of uninitialized value in string at /usr/local/share/perl/5.8.7/ 
Test/Perl/Critic.pm line 82.
#
Use of uninitialized value in string at /usr/local/share/perl/5.8.7/ 
Test/Perl/Critic.pm line 82.
#

No violations reported - just a bunch of undefs flying around inside  
Test::Perl::Critic. Obviously I'm doing something stupid but Google  
is uncharacteristically terse on the subject.

-- 
Andy Armstrong, hexten.net



More information about the london.pm mailing list