Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / Module / Install / WriteAll.pm
CommitLineData
3fea05b9 1package Module::Install::WriteAll;
2
3use strict;
4use Module::Install::Base ();
5
6use vars qw{$VERSION @ISA $ISCORE};
7BEGIN {
8 $VERSION = '0.91';;
9 @ISA = qw{Module::Install::Base};
10 $ISCORE = 1;
11}
12
13sub WriteAll {
14 my $self = shift;
15 my %args = (
16 meta => 1,
17 sign => 0,
18 inline => 0,
19 check_nmake => 1,
20 @_,
21 );
22
23 $self->sign(1) if $args{sign};
24 $self->admin->WriteAll(%args) if $self->is_admin;
25
26 $self->check_nmake if $args{check_nmake};
27 unless ( $self->makemaker_args->{PL_FILES} ) {
28 $self->makemaker_args( PL_FILES => {} );
29 }
30
31 # Until ExtUtils::MakeMaker support MYMETA.yml, make sure
32 # we clean it up properly ourself.
33 $self->realclean_files('MYMETA.yml');
34
35 if ( $args{inline} ) {
36 $self->Inline->write;
37 } else {
38 $self->Makefile->write;
39 }
40
41 # The Makefile write process adds a couple of dependencies,
42 # so write the META.yml files after the Makefile.
43 if ( $args{meta} ) {
44 $self->Meta->write;
45 }
46
47 # Experimental support for MYMETA
48 if ( $ENV{X_MYMETA} ) {
49 if ( $ENV{X_MYMETA} eq 'JSON' ) {
50 $self->Meta->write_mymeta_json;
51 } else {
52 $self->Meta->write_mymeta_yaml;
53 }
54 }
55
56 return 1;
57}
58
591;