| 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
| |||||||||||
| 24 | 41 | ▶ | $self->admin->WriteAll(%args) if $self->is_admin; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | |||||||||||
| 26 | 41 | ▶ | $self->check_nmake if $args{check_nmake}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 27 | 41 | ▶ | unless ( $self->makemaker_args->{PL_FILES} ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | # XXX: This still may be a bit over-defensive... | ||||||||||
| 29 | 40 | ▶ | unless ($self->makemaker(6.25)) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 30 | 0 | ▶ | $self->makemaker_args( PL_FILES => {} ) if -f 'Build.PL'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 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
| |||||||||||
| 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
| |||||||||||
| 47 | 38 | $self->Meta->write; | |||||||||
| 48 | } | ||||||||||
| 49 | |||||||||||
| 50 | # Experimental support for MYMETA | ||||||||||
| 51 | 38 | ▶ | if ( $ENV{X_MYMETA} ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 52 | 0 | ▶ | if ( $ENV{X_MYMETA} eq 'JSON' ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 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; | |||||||||