2 use warnings FATAL => 'all';
5 use ExtUtils::HasCompiler qw(can_compile_loadable_object);
8 name => 'Devel-GlobalDestruction',
11 configure => { requires => {
12 'ExtUtils::MakeMaker' => 0,
13 'ExtUtils::CBuilder' => 0.27,
17 'Sub::Exporter::Progressive' => '0.001011',
23 homepage => 'https://metacpan.org/release/Devel-GlobalDestruction',
25 url => 'git://git.shadowcat.co.uk/p5sagit/Devel-GlobalDestruction.git',
26 web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Devel-GlobalDestruction.git',
30 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Devel-GlobalDestruction',
31 mailto => 'bug-Devel-GlobalDestruction@rt.cpan.org',
33 license => [ 'http://dev.perl.org/licenses/' ],
36 directory => [ 't', 'xt' ]
42 ( (defined ${^GLOBAL_PHASE} or parse_args()->{PUREPERL_ONLY}
43 or !can_compile_loadable_object(quiet => 1) )
45 : ('Devel::GlobalDestruction::XS' => 0)
54 ExtUtils::MakeMaker::parse_args(
56 Text::ParseWords::shellwords($ENV{PERL_MM_OPT} || ''),
59 return $tmp->{ARGS} || {};
62 if (eval { require Devel::GlobalDestruction }
63 && Devel::GlobalDestruction->VERSION < 0.10) {
71 $(NOECHO) $(RM_F) ' . $self->quote_literal(
72 $self->catfile('$(DESTINSTALLSITEARCH)', 'Devel', 'GlobalDestruction.pm')
73 ) . "\n" . $self->SUPER::install;
77 ## BOILERPLATE ###############################################################
78 require ExtUtils::MakeMaker;
79 (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
81 # have to do this since old EUMM dev releases miss the eval $VERSION line
82 my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
83 my $mymeta = $eumm_version >= 6.57_02;
84 my $mymeta_broken = $mymeta && $eumm_version < 6.57_07;
86 ($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g;
87 ($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g;
88 $META{license} = [ $META{license} ]
89 if $META{license} && !ref $META{license};
90 $MM_ARGS{LICENSE} = $META{license}[0]
91 if $META{license} && $eumm_version >= 6.30;
92 $MM_ARGS{NO_MYMETA} = 1
94 $MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META }
97 for (qw(configure build test runtime)) {
98 my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
99 my $r = $MM_ARGS{$key} = {
100 %{$META{prereqs}{$_}{requires} || {}},
101 %{delete $MM_ARGS{$key} || {}},
103 defined $r->{$_} or delete $r->{$_} for keys %$r;
106 $MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
108 delete $MM_ARGS{MIN_PERL_VERSION}
109 if $eumm_version < 6.47_01;
110 $MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}}
111 if $eumm_version < 6.63_03;
112 $MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}}
113 if $eumm_version < 6.55_01;
114 delete $MM_ARGS{CONFIGURE_REQUIRES}
115 if $eumm_version < 6.51_03;
117 ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);
118 ## END BOILERPLATE ###########################################################