blib/lib/App/ape.pm

filter: Statementstmt 100% 29 / 29 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 1 / 1 totaltotal 97.4% 38 / 39 CC 2 SCAR 2.2
CC
2
Cov
97%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« blib/lib/App/Prove/Plugin/Elasticsearch.pm ↑ Summary blib/lib/App/Prove/Elasticsearch/Blamer/System.pm »
1 package App::ape;
2 4 $App::ape::VERSION = '0.001';
3  
4 # PODNAME: App::ape
5 # ABSTRACT: Implements the `ape` binary
6  
7 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 4 ▶use Pod::Usage;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 4 ▶use App::ape::test;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 4 ▶use App::ape::plan;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 4 ▶use App::ape::update;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 2 ▶sub new {
Subroutine new: called CC=2 SCAR=6.9
Pod documented
17 2 my (undef, @args) = @_;
18 2 my $command = shift @args;
19  
20 #I am being sneaky here and using bin/ape's POD
21 2 ▶ return pod2usage(0) unless grep { $_ eq $command } qw{plan test update};
Branch: 1 branch
BranchTrueFalseTotal
unless grep {$_ eq $command;} "plan", "test", "update" 0 2 2
22  
23 2 my $program = "App::ape::$command";
24 2 my $program_perlized = "$program.pm";
25 2 $program_perlized =~ s/::/\//g;
26 2 $0 = $INC{$program_perlized};
27  
28 2 return $program->new(@args);
29 }
30  
31 4 1;
32  
33 __END__
« blib/lib/App/Prove/Plugin/Elasticsearch.pm ↑ Summary blib/lib/App/Prove/Elasticsearch/Blamer/System.pm »