t/test/inc/Module/Install/WriteAll.pm

filter: Statementstmt 87.1% 27 / 31 Branchbran 43.7% 7 / 16 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 73.5% 39 / 53 CC 9 SCAR 22.7
CC
9
Cov
72%
WriteAll
13.5
BEGIN
1.0
BEGIN
1.0
CRAP 9.7
« t/test/inc/Module/Install.pm ↑ Summary t/test/inc/Module/Install/Can.pm »
1 #line 1
2 package Module::Install::WriteAll;
3 1 ▶ 
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 use Module::Install::Base ();
6 1 ▶ 
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use vars qw{$VERSION @ISA $ISCORE};
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 BEGIN {
9 1 $VERSION = '0.91';;
10 1 @ISA = qw{Module::Install::Base};
11 $ISCORE = 1;
12 }
13 1 ▶ 
Subroutine WriteAll: called CC=9 SCAR=26.0
Pod undocumented
14 1 sub WriteAll {
15 1 my $self = shift;
16 my %args = (
17 meta => 1,
18 sign => 0,
19 inline => 0,
20 check_nmake => 1,
21 @_,
22 );
23 1 ▶ 
Branch: 1 branch
BranchTrueFalseTotal
if $args{"sign"} 0 1 1
24 1 ▶ $self->sign(1) if $args{sign};
Branch: 1 branch
BranchTrueFalseTotal
if $self->is_admin 0 1 1
25 $self->admin->WriteAll(%args) if $self->is_admin;
26 1 ▶ 
Branch: 1 branch
BranchTrueFalseTotal
if $args{"check_nmake"} 0 1 1
27 1 ▶ $self->check_nmake if $args{check_nmake};
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->makemaker_args->{"PL_FILES"}) 1 0 1
28 1 unless ( $self->makemaker_args->{PL_FILES} ) {
29 $self->makemaker_args( PL_FILES => {} );
30 }
31  
32 # Until ExtUtils::MakeMaker support MYMETA.yml, make sure
33 1 # we clean it up properly ourself.
34 $self->realclean_files('MYMETA.yml');
35 1 ▶ 
Branch: 1 branch
BranchTrueFalseTotal
if ($args{'inline'}) { } 0 1 1
36 0 if ( $args{inline} ) {
37 $self->Inline->write;
38 1 } else {
39 $self->Makefile->write;
40 }
41  
42 # The Makefile write process adds a couple of dependencies,
43 1 ▶ # so write the META.yml files after the Makefile.
Branch: 1 branch
BranchTrueFalseTotal
if ($args{"meta"}) 1 0 1
44 1 if ( $args{meta} ) {
45 $self->Meta->write;
46 }
47  
48 1 ▶ # Experimental support for MYMETA
Branch: 1 branch
BranchTrueFalseTotal
if ($ENV{"X_MYMETA"}) 0 1 1
49 0 ▶ if ( $ENV{X_MYMETA} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ENV{'X_MYMETA'} eq 'JSON') { } 0 0 0
50 0 if ( $ENV{X_MYMETA} eq 'JSON' ) {
51 $self->Meta->write_mymeta_json;
52 0 } else {
53 $self->Meta->write_mymeta_yaml;
54 }
55 }
56 1  
57 return 1;
58 }
59 1  
60 1;
« t/test/inc/Module/Install.pm ↑ Summary t/test/inc/Module/Install/Can.pm »