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',
28 'Test::Pod' => '1.00',
29 'Test::Pod::Coverage' => '1.00',
35 # rw: catagits@git.shadowcat.co.uk:Catalyst-Plugin-ConfigLoader.git
36 url => 'git://git.shadowcat.co.uk/catagits/Catalyst-Plugin-ConfigLoader.git',
37 web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/Catalyst-Plugin-ConfigLoader.git',
40 x_IRC => 'irc://irc.perl.org/#catalyst',
42 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Catalyst-Plugin-ConfigLoader',
43 mailto => 'bug-Catalyst-Plugin-ConfigLoader@rt.cpan.org',
45 license => [ 'http://dev.perl.org/licenses/' ],
48 directory => [ 't', 'xt' ]
54 ## BOILERPLATE ###############################################################
55 require ExtUtils::MakeMaker;
56 (do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
58 # have to do this since old EUMM dev releases miss the eval $VERSION line
59 my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
60 my $mymeta = $eumm_version >= 6.57_02;
61 my $mymeta_broken = $mymeta && $eumm_version < 6.57_07;
63 ($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g;
64 ($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g;
65 $META{license} = [ $META{license} ]
66 if $META{license} && !ref $META{license};
67 $MM_ARGS{LICENSE} = $META{license}[0]
68 if $META{license} && $eumm_version >= 6.30;
69 $MM_ARGS{NO_MYMETA} = 1
71 $MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META }
74 for (qw(configure build test runtime)) {
75 my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
76 my $r = $MM_ARGS{$key} = {
77 %{$META{prereqs}{$_}{requires} || {}},
78 %{delete $MM_ARGS{$key} || {}},
80 defined $r->{$_} or delete $r->{$_} for keys %$r;
83 $MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
85 delete $MM_ARGS{MIN_PERL_VERSION}
86 if $eumm_version < 6.47_01;
87 $MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}}
88 if $eumm_version < 6.63_03;
89 $MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}}
90 if $eumm_version < 6.55_01;
91 delete $MM_ARGS{CONFIGURE_REQUIRES}
92 if $eumm_version < 6.51_03;
94 ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);
95 ## END BOILERPLATE ###########################################################