From: Vincent Pit Date: Sat, 7 Feb 2009 21:31:52 +0000 (+0100) Subject: Use recent ExtUtils::MakeMaker features to generate a better META.yml X-Git-Tag: v0.05~7 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Fsubs-auto.git;a=commitdiff_plain;h=34495d43ac838096f560f40988f43ef20f8476e1 Use recent ExtUtils::MakeMaker features to generate a better META.yml --- diff --git a/Makefile.PL b/Makefile.PL index fb42c97..030031f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -4,39 +4,43 @@ use strict; use warnings; use ExtUtils::MakeMaker; -my $BUILD_REQUIRES = { - 'ExtUtils::MakeMaker' => 0, - 'Test::More' => 0, -}; +my $dist = 'subs-auto'; -sub build_req { - my $tometa = ' >> $(DISTVNAME)/META.yml;'; - my $build_req = 'echo "build_requires:" ' . $tometa; - foreach my $mod ( sort { lc $a cmp lc $b } keys %$BUILD_REQUIRES ) { - my $ver = $BUILD_REQUIRES->{$mod}; - $build_req .= sprintf 'echo " %-30s %s" %s', "$mod:", $ver, $tometa; - } - return $build_req; -} +my %META = ( + configure_requires => { + 'ExtUtils::MakeMaker' => 0, + }, + build_requires => { + 'ExtUtils::MakeMaker' => 0, + 'Test::More' => 0, + }, + resources => { + bugtracker => "http://rt.cpan.org/NoAuth/ReportBug.html?Queue=$dist", + homepage => "http://search.cpan.org/dist/$dist/", + license => 'http://dev.perl.org/licenses/', + repository => "http://git.profvince.com/perl/modules/$dist.git", + }, +); WriteMakefile( - NAME => 'subs::auto', - AUTHOR => 'Vincent Pit ', - LICENSE => 'perl', - VERSION_FROM => 'lib/subs/auto.pm', - ABSTRACT_FROM => 'lib/subs/auto.pm', - PL_FILES => {}, - PREREQ_PM => { + NAME => 'subs::auto', + AUTHOR => 'Vincent Pit ', + LICENSE => 'perl', + VERSION_FROM => 'lib/subs/auto.pm', + ABSTRACT_FROM => 'lib/subs/auto.pm', + PL_FILES => {}, + PREREQ_PM => { 'Carp' => 0, 'Symbol' => 0, 'Variable::Magic' => 0.08 }, - dist => { - PREOP => 'pod2text lib/subs/auto.pm > $(DISTVNAME)/README; ' - . build_req, - COMPRESS => 'gzip -9f', SUFFIX => 'gz' + dist => { + PREOP => 'pod2text lib/subs/auto.pm > $(DISTVNAME)/README', + COMPRESS => 'gzip -9f', SUFFIX => 'gz' }, - clean => { FILES => 'subs-auto-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt' } + clean => { + FILES => "$dist-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt" + } ); 1;