3 # This script can be used to run perlcritic on perl files in koha
4 # The script is purely optional requiring Test::Perl::Critic to be installed
5 # and the environment variable TEST_QA to be set
9 use English qw(-no_match_vars);
11 if ( not $ENV{TEST_QA} ) {
12 my $msg = 'Author test. Set $ENV{TEST_QA} to a true value to run';
13 plan( skip_all => $msg );
16 eval { require Test::Perl::Critic; };
19 my $msg = 'Test::Perl::Critic required to criticise code,';
20 plan( skip_all => $msg );
23 Test::Perl::Critic->import( -profile => '.perlcriticrc');