X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=9de5dd2cc9bf327346d8d83de1887d7a6dc4c331;hb=e861fe165783d50b227da184c2c80fea5442c611;hp=25eb38f4eba51555a2ecb7fa51df7ad4afab37a7;hpb=10d61eda6b8d59b2183b783da40608b0c6afe175;p=gitmo%2FClass-C3.git diff --git a/Makefile.PL b/Makefile.PL index 25eb38f..9de5dd2 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,23 +1,48 @@ -use inc::Module::Install 0.75; +use warnings; +use strict; +use 5.006002; +use inc::Module::Install 1.06; + +perl_version '5.006002'; name 'Class-C3'; all_from 'lib/Class/C3.pm'; -# Class::C3 under 5.9.5+ has no deps -if($] < 5.009_005) { - test_requires 'Test::More' => '0.47'; +test_requires 'Test::More' => '0.47'; - feature 'XS Speedups', 'Class::C3::XS' => '0.07'; +# needed by the PP version only, have them installed +# regardless of XS availability or perl version +# (for fatpacking and whatnot) +requires 'Algorithm::C3' => '0.07'; +requires 'Scalar::Util' => '0'; - # Would like to disable these if they answer yes above too ... - requires 'Algorithm::C3' => '0.06'; - requires 'Scalar::Util' => '1.10'; -} +# XS not interesting after mro is cored +requires 'Class::C3::XS' => '0.13' + if $] < 5.009_005 and can_xs(); + +test_requires 'Devel::Hide' => 0 + if is_smoker(); + +if($Module::Install::AUTHOR) { + # compiler detection, goes into META + configure_requires 'ExtUtils::MakeMaker' => '6.52'; + configure_requires 'ExtUtils::CBuilder' => '0.27'; -# Rebuild README for maintainers -if(-e 'MANIFEST.SKIP') { - system("pod2text lib/Class/C3.pm >README"); + # Rebuild README for maintainers + system("pod2text lib/Class/C3.pm >README"); } -auto_provides; WriteAll; + +if ($Module::Install::AUTHOR) { + @{Meta->{values}{requires}} = grep + { $_->[0] !~ /^ (?: Class::C3::XS | Devel::Hide ) $/x } + @{Meta->{values}{requires}} + ; + print "Regenerating META with XS/test requires excluded\n"; + Meta->write; +} + +sub is_smoker { + return ( $ENV{AUTOMATED_TESTING} && ! $ENV{PERL5_CPANM_IS_RUNNING} && ! $ENV{RELEASE_TESTING} ) +}