Lines 1-18
Link Here
|
1 |
#!/usr/bin/env perl |
1 |
#!/usr/bin/env perl |
2 |
|
2 |
|
3 |
# This script can be used to run perlcritic on perl files in koha |
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 |
6 |
|
4 |
|
7 |
use Modern::Perl; |
5 |
use Modern::Perl; |
8 |
use Test::More; |
6 |
use Test::More; |
9 |
use English qw(-no_match_vars); |
7 |
use English qw(-no_match_vars); |
10 |
|
8 |
|
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 ); |
14 |
} |
15 |
|
16 |
eval { require Test::Perl::Critic; }; |
9 |
eval { require Test::Perl::Critic; }; |
17 |
|
10 |
|
18 |
if ( $EVAL_ERROR ) { |
11 |
if ( $EVAL_ERROR ) { |