diff options
author | Aristotle Pagaltzis <pagaltzis@gmx.de> | 2022-08-10 00:49:53 +0200 |
---|---|---|
committer | Aristotle Pagaltzis <pagaltzis@gmx.de> | 2022-08-10 00:49:53 +0200 |
commit | 7cfe83bafc3ba29325b142254b81c63b64c79089 (patch) | |
tree | 5f8fac55646952ea3ae732c3b12abb6de7aa873a /Makefile.PL | |
parent | 1c788cce5893764ae00268ba333d68484cc4132d (diff) |
update dist boilerplate
Diffstat (limited to 'Makefile.PL')
-rw-r--r-- | Makefile.PL | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Makefile.PL b/Makefile.PL index 1510283..8a86a32 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -30,10 +30,11 @@ my %META = ( }, ); -sub MY::postamble { <<'' } +sub MY::postamble { -f 'META.yml' ? return : <<'' } create_distdir : MANIFEST +distdir : MANIFEST MANIFEST : - ( git ls-files ':!README.pod' . ; echo MANIFEST ) > MANIFEST + ( git ls-files ':!README.pod' ; echo MANIFEST ) > MANIFEST distdir : boilerplate .PHONY : boilerplate boilerplate : distmeta @@ -49,9 +50,11 @@ my $eumm_version = eval $ExtUtils::MakeMaker::VERSION; my $mymeta = $eumm_version >= 6.57_02; my $mymeta_broken = $mymeta && $eumm_version < 6.57_07; +(my $basepath = (-d 'lib' && 'lib/') . $META{name}) =~ s{-}{/}g; + ($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g; -($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g; -$MM_ARGS{ABSTRACT_FROM} = $MM_ARGS{VERSION_FROM}; +$MM_ARGS{VERSION_FROM} = "$basepath.pm"; +$MM_ARGS{ABSTRACT_FROM} = -f "$basepath.pod" ? "$basepath.pod" : "$basepath.pm"; $META{license} = [ $META{license} ] if $META{license} && !ref $META{license}; $MM_ARGS{LICENSE} = $META{license}[0] @@ -73,7 +76,7 @@ for (qw(configure build test runtime)) { defined $r->{$_} or delete $r->{$_} for keys %$r; } -$MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0; +$MM_ARGS{MIN_PERL_VERSION} = eval delete $MM_ARGS{PREREQ_PM}{perl} || 0; delete $MM_ARGS{MIN_PERL_VERSION} if $eumm_version < 6.47_01; |