[Catalyst-commits] r8881 - Catalyst-Runtime/5.80/trunk
ash at dev.catalyst.perl.org
ash at dev.catalyst.perl.org
Sun Dec 14 20:06:51 GMT 2008
Author: ash
Date: 2008-12-14 20:06:51 +0000 (Sun, 14 Dec 2008)
New Revision: 8881
Modified:
Catalyst-Runtime/5.80/trunk/Makefile.PL
Log:
author-only build_requires no long appear in META.yml. Also added some meta resources (homepage, IRC links etc) while i was there
Modified: Catalyst-Runtime/5.80/trunk/Makefile.PL
===================================================================
--- Catalyst-Runtime/5.80/trunk/Makefile.PL 2008-12-14 18:53:04 UTC (rev 8880)
+++ Catalyst-Runtime/5.80/trunk/Makefile.PL 2008-12-14 20:06:51 UTC (rev 8881)
@@ -44,13 +44,20 @@
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 (-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 ($Module::Install::AUTHOR) {
+ foreach my $module (@force_build_requires_if_author) {
+ build_requires $module;
+ }
+
+
if ($^O eq 'darwin') {
my $osx_ver = `/usr/bin/sw_vers -productVersion`;
chomp $osx_ver;
@@ -69,6 +76,31 @@
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:
More information about the Catalyst-commits
mailing list