App/Yath/Plugin/ShareDirDist.pm

filter: Statementstmt 95.0% 19 / 20 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 86.6% 26 / 30 CC 2 SCAR 3.0
CC
2
Cov
88%
pre_init
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« File/ShareDir/Dist/Install.pm ↑ Summary App/Prove/Plugin/ShareDirDist.pm »
1 package App::Yath::Plugin::ShareDirDist;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use File::Spec;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use File::Basename ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 # ABSTRACT: A prove plugin that works with File::ShareDir::Dist
9 2 our $VERSION = '0.07'; # VERSION
10  
11  
12 sub pre_init
13 1 ▶{
Subroutine pre_init: called CC=2 SCAR=7.1
Pod undocumented
14 1 ▶ if(-d "share")
Branch: 1 branch
BranchTrueFalseTotal
if (-d "share") 1 0 1
15 {
16 1 my $dist_name = File::Basename::basename(File::Spec->rel2abs("."));
17 1 $ENV{PERL_FILE_SHAREDIR_DIST} = "$dist_name=share";
18 }
19 }
20  
21 2 ▶if(eval { require App::Yath::Plugin })
Branch: 1 branch
BranchTrueFalseTotal
if (eval { do { require App::Yath::Plugin } }) 0 2 2
22 {
23 0 our @ISA = ('App::Yath::Plugin');
24 }
25  
26 2 1;
27  
28 __END__
« File/ShareDir/Dist/Install.pm ↑ Summary App/Prove/Plugin/ShareDirDist.pm »