X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=75b454d5e8684d631715fbdef653c58d5d8344cb;hb=b528a1eba0217496450d97c730eebb735159539d;hp=58067c1cc6d10912d431d922c0a330d42e68001b;hpb=0effd05f2e344651214c390ed5e078f46eba0dc6;p=p5sagit%2FClass-Accessor-Grouped.git diff --git a/Makefile.PL b/Makefile.PL index 58067c1..75b454d 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -82,11 +82,22 @@ my %MM_ARGS = ( ("$]" < 5.009_005 ? ( 'MRO::Compat' => 0 ) : ()), }, realclean => { FILES => 'README' }, - (-e 'META.yml' ? () : test => { TESTS => 't/*.t xt/*.t xt/*/*.t' } ), + (-e 'META.yml' ? () : ( test => { TESTS => 't/*.t xt/*.t xt/*/*.t' } ) ), ); -if (!-e 'META.yml') { - system('pod2text lib/Class/Accessor/Grouped.pm > README'); +{ + package MY; + sub distdir { + my ($self, @arg) = @_; + my $frag = $self->SUPER::distdir(@arg); + $frag =~ s/^(distdir\s*:.*)/$1 create_readme/m; + $frag .= <<'END_MAKE'; +create_readme: create_distdir + pod2text lib/Class/Accessor/Grouped.pm > $(DISTVNAME)/README + cd $(DISTVNAME) && $(PERLRUN) "-MExtUtils::Manifest=maniadd" -e "maniadd({ README => 'Generated README' })" +END_MAKE + $frag; + } } use Text::ParseWords; @@ -111,6 +122,7 @@ my $mymeta_broken = $mymeta && $eumm_version < 6.57_07; ($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}; $META{license} = [ $META{license} ] if $META{license} && !ref $META{license}; $MM_ARGS{LICENSE} = $META{license}[0]