2 use warnings FATAL => 'all';
6 name => 'Catalyst-Plugin-ConfigLoader',
9 configure => { requires => {
10 'ExtUtils::MakeMaker' => 0,
20 'Catalyst::Runtime' => '5.7008', # needed for env_value()
21 'Data::Visitor' => '0.24',
22 'Config::Any' => '0.20',
23 'MRO::Compat' => '0.09',
33 url => 'https://github.com/perl-catalyst/Catalyst-Plugin-ConfigLoader.git',
34 web => 'https://github.com/perl-catalyst/Catalyst-Plugin-ConfigLoader',
37 x_IRC => 'irc://irc.perl.org/#catalyst',
39 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Catalyst-Plugin-ConfigLoader',
40 mailto => 'bug-Catalyst-Plugin-ConfigLoader@rt.cpan.org',
42 license => [ 'http://dev.perl.org/licenses/' ],
45 directory => [ 't', 'xt' ]
51 ## BOILERPLATE ###############################################################
52 require ExtUtils::MakeMaker;
53 (do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
55 # have to do this since old EUMM dev releases miss the eval $VERSION line
56 my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
57 my $mymeta = $eumm_version >= 6.57_02;
58 my $mymeta_broken = $mymeta && $eumm_version < 6.57_07;
60 ($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g;
61 ($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g;
62 $META{license} = [ $META{license} ]
63 if $META{license} && !ref $META{license};
64 $MM_ARGS{LICENSE} = $META{license}[0]
65 if $META{license} && $eumm_version >= 6.30;
66 $MM_ARGS{NO_MYMETA} = 1
68 $MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META }
71 for (qw(configure build test runtime)) {
72 my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
73 my $r = $MM_ARGS{$key} = {
74 %{$META{prereqs}{$_}{requires} || {}},
75 %{delete $MM_ARGS{$key} || {}},
77 defined $r->{$_} or delete $r->{$_} for keys %$r;
80 $MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
82 delete $MM_ARGS{MIN_PERL_VERSION}
83 if $eumm_version < 6.47_01;
84 $MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}}
85 if $eumm_version < 6.63_03;
86 $MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}}
87 if $eumm_version < 6.55_01;
88 delete $MM_ARGS{CONFIGURE_REQUIRES}
89 if $eumm_version < 6.51_03;
91 ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);
92 ## END BOILERPLATE ###########################################################