lib/Module/Install/WriteAll.pm

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