Skip to content

Commit

Permalink
Added metrics.t
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Jul 7, 2017
1 parent efbea37 commit 3817a55
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
4 changes: 1 addition & 3 deletions MANIFEST
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.appveyor.yml
.travis.yml
Changes
ignore.txt
lib/CGI/ACL.pm
Expand All @@ -20,7 +18,7 @@ t/gv.t
t/ip.t
t/kwalitee.t
t/manifest.t
# t/metrics.t
t/metrics.t
t/noop.t
t/pod-cm.t
t/pod.t
Expand Down
5 changes: 2 additions & 3 deletions Makefile.PL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use strict;
use warnings;
use ExtUtils::MakeMaker;
use ExtUtils::MakeMaker 6.64; # 6.64 for TEST_REQUIRES
use File::Spec;

WriteMakefile(
Expand All @@ -13,7 +13,7 @@ WriteMakefile(
? ('LICENSE'=> 'GPL')
: ()),
PL_FILES => {},
BUILD_REQUIRES => {
TEST_REQUIRES => {
'Test::Carp' => 0,
'Test::Most' => 0,
'File::Spec' => 0,
Expand All @@ -22,7 +22,6 @@ WriteMakefile(
# 'Test::Kwalitee' => 0,
'autodie' => 0,
'IPC::System::Simple' => 0,
'CGI::Info' => 0,
'CGI::Lingua' => 0.15,
},
PREREQ_PM => {
Expand Down
1 change: 1 addition & 0 deletions ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ CGI-ACL-*
.git
.*.swp
*.bak
.*.yml
21 changes: 21 additions & 0 deletions t/metrics.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!perl -wT

use strict;
use warnings;
use File::Spec;
use Test::Most;

if(not $ENV{RELEASE_TESTING}) {
plan(skip_all => 'Author tests not required for installation');
}

eval { require Test::Perl::Metrics::Simple; };

if($@) {
my $msg = 'Test::Perl::Metrics::Simple required to criticise code';
plan(skip_all => $msg);
}

Test::Perl::Metrics::Simple->import(-complexity => 30);

all_metrics_ok();

0 comments on commit 3817a55

Please sign in to comment.