From: Ash Berlin Date: Sun, 14 Dec 2008 20:06:51 +0000 (+0000) Subject: author-only build_requires no long appear in META.yml. Also added some meta resources... X-Git-Tag: 5.8000_05~92 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=621f279bae1d9f6db574f39b5aa98c91dc76035b;hp=9de04be2409ca5e726e2300090359ed3e066f4e4 author-only build_requires no long appear in META.yml. Also added some meta resources (homepage, IRC links etc) while i was there --- diff --git a/Makefile.PL b/Makefile.PL index 2772633..590ce36 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -44,12 +44,19 @@ if ( ( exists $ENV{AGGREGATE_TESTS} && !$ENV{AGGREGATE_TESTS}) else { test_requires('Test::Aggregate', '0.34_01'); } +my @force_build_requires_if_author = qw( + Test::NoTabs + Test::Pod + Test::Pod::Coverage + Pod::Coverage +); + +if ($Module::Install::AUTHOR) { + + foreach my $module (@force_build_requires_if_author) { + build_requires $module; + } -if (-e 'inc/.author') { - build_requires 'Test::NoTabs'; - build_requires 'Test::Pod' => 1.14; - build_requires 'Test::Pod::Coverage' => 1.04; - build_requires 'Pod::Coverage' => 0.19; if ($^O eq 'darwin') { my $osx_ver = `/usr/bin/sw_vers -productVersion`; @@ -69,6 +76,31 @@ install_script glob('script/*.pl'); auto_install; WriteAll; +if ($Module::Install::AUTHOR) { + + # Strip out the author only build_requires from META.yml + # Need to do this _after_ WriteAll else it looses track of them + Meta->{values}{build_requires} = [ grep { + my $ok = 1; + foreach my $module (@force_build_requires_if_author) { + if ($_->[0] =~ /$module/) { + $ok = 0; + last; + } + } + $ok; + } @{Meta->{values}{build_requires}} ]; + + Meta->{values}{resources} = [ + [ 'MailingList', 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst' ], + [ 'IRC', 'irc://irc.perl.org/#catalyst' ], + [ 'license', 'http://dev.perl.org/licenses/' ], + [ 'homepage', 'http://dev.catalyst.perl.org/'], + [ 'repository', 'http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/' ], + ]; + + Meta->write; +} print <<"EOF"; Important: