7
use ExtUtils::MakeMaker 6.31;
5
use ExtUtils::MakeMaker;
7
my $mymeta_works = eval { ExtUtils::MakeMaker->VERSION('6.5707'); 1 };
8
my $mymeta = $mymeta_works || eval { ExtUtils::MakeMaker->VERSION('6.5702'); 1 };
11
'Test::More' => '0.88',
15
'Package::Stash' => '0.23',
18
my %OPT_RUN_DEPS = (can_cc() ? (
19
'B::Hooks::EndOfScope' => '0.07', # when changing, also change version in namespace/clean.pm
20
is_smoker() ? ( 'Devel::Hide' => 0 ) : (), # make sure we smoke the pure-perl version
25
homepage => 'http://search.cpan.org/dist/namespace-clean',
27
# EUMM not supporting nested meta :(
30
# url => 'git://git.shadowcat.co.uk/p5sagit/namespace-clean.git',
31
# web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/namespace-clean.git',
34
# mailto => 'bug-namespace-clean@rt.cpan.org',
35
# web => 'http://rt.cpan.org/Public/Dist/Display.html?Name=namespace-clean',
38
repository => 'git://git.shadowcat.co.uk/p5sagit/namespace-clean.git',
39
bugtracker => 'http://rt.cpan.org/Public/Dist/Display.html?Name=namespace-clean',
11
43
my %WriteMakefileArgs = (
44
'NAME' => 'namespace::clean',
45
'VERSION_FROM' => 'lib/namespace/clean.pm',
12
46
'ABSTRACT' => 'Keep imports and functions out of your namespace',
13
47
'AUTHOR' => 'Robert \'phaylon\' Sedlacek <rs@474.at>, Florian Ragwitz <rafl@debian.org>, Jesse Luehrs <doy@tozt.net>',
17
'Test::More' => '0.88',
20
'CONFIGURE_REQUIRES' => {
21
'ExtUtils::MakeMaker' => '6.31'
23
'DISTNAME' => 'namespace-clean',
50
%RUN_DEPS, %OPT_RUN_DEPS,
51
$mymeta_works ? () : (%BUILD_DEPS),
55
? ( # BUILD_REQUIRES makes MYMETA right, requires stops META being wrong
56
'BUILD_REQUIRES' => \%BUILD_DEPS,
59
requires => \%RUN_DEPS,
62
: ( # META_ADD both to get META right - only Makefile written
65
requires => \%RUN_DEPS,
66
build_requires => \%BUILD_DEPS,
71
($mymeta and !$mymeta_works) ? ( 'NO_MYMETA' => 1 ) : (),
25
73
'LICENSE' => 'perl',
26
'NAME' => 'namespace::clean',
28
'B::Hooks::EndOfScope' => '0.07',
29
'Package::Stash' => '0.22',
30
'Sub::Identify' => '0.04',
31
'Sub::Name' => '0.04',
41
unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
77
unless ( eval { ExtUtils::MakeMaker->VERSION('6.56') } ) {
42
78
my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
43
79
my $pp = $WriteMakefileArgs{PREREQ_PM};
44
80
for my $mod ( keys %$br ) {
54
90
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
55
unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
91
unless eval { ExtUtils::MakeMaker->VERSION('6.52') };
57
93
WriteMakefile(%WriteMakefileArgs);
96
# can we locate a (the) C compiler
98
my @chunks = split(/ /, $Config::Config{cc}) or return;
100
# $Config{cc} may contain args; try to find out the program part
102
return can_run("@chunks") || (pop(@chunks), next);
108
# check if we can run some command
112
return $cmd if -x $cmd;
113
if (my $found_cmd = MM->maybe_command($cmd)) {
117
for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
119
my $abs = File::Spec->catfile($dir, $cmd);
120
return $abs if (-x $abs or $abs = MM->maybe_command($abs));
127
return ( $ENV{AUTOMATED_TESTING} && ! $ENV{PERL5_CPANM_IS_RUNNING} && ! $ENV{RELEASE_TESTING} )