2 use warnings FATAL => 'all';
6 name => 'Catalyst-Devel',
9 configure => { requires => {
10 'ExtUtils::MakeMaker' => 0,
11 'File::ShareDir::Install' => 0,
15 'Test::More' => '0.94',
16 'Test::Fatal' => '0.003',
22 'MooseX::Emulate::Class::Accessor::Fast' => 0,
23 'File::ShareDir' => 0,
24 'namespace::clean' => 0,
25 'namespace::autoclean' => 0,
26 'Catalyst' => '5.90001',
27 'Catalyst::Action::RenderView' => '0.10',
28 'Catalyst::Plugin::Static::Simple' => '0.28',
29 'Catalyst::Plugin::ConfigLoader' => '0.30',
30 'Config::General' => '2.42',
31 'File::ChangeNotify' => '0.07',
32 'File::Copy::Recursive' => 0,
33 'Path::Class' => '0.09',
35 'Module::Install' => '1.02',
40 'Proc::Background' => 0,
42 'Test::Pod::Coverage' => 0,
48 url => 'git://git.shadowcat.co.uk/catagits/Catalyst-Devel.git',
49 web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/Catalyst-Devel.git',
52 x_IRC => 'irc://irc.perl.org/#catalyst',
53 x_MailingList => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst',
54 homepage => 'http://dev.catalyst.perl.org/',
56 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Catalyst-Devel',
57 mailto => 'bug-Catalyst-Devel@rt.cpan.org',
59 license => [ 'http://dev.perl.org/licenses/' ],
62 directory => [ 't', 'xt' ]
64 x_authority => 'cpan:MSTROUT',
69 use File::ShareDir::Install qw(install_share postamble);
70 install_share 'share';
75 # kill warning from older versions of Class::C3
76 ( ("$]" >= 5.009_005 && eval { require Class::C3 } && !eval { Class::C3->VERSION(0.20) }) ? (
77 'Class::C3' => '0.20',
82 if (!$ENV{CATALYST_DEVEL_NO_510_CHECK}) {
85 open my $in, '<', File::Spec->devnull;
86 my $pid = IPC::Open3::open3($in, my $out, undef, $^X, '-It/lib', '-MUnknownError', '-e1');
87 my $output = do { local $/; <$out> };
91 if ($output =~ /^Unknown error/m) {
93 ############################### WARNING #################################
95 # You are using perl 5.10.0 with the "Unknown error" bug. This can make #
96 # developing Catalyst applications much more painful, as it will come #
97 # up with no details every time you have a syntax error in a Controller.#
99 # For more information see: #
101 # * http://rt.perl.org/rt3/Public/Bug/Display.html?id=49472 #
103 # It is highly recommended that you use a different version of perl or #
104 # compile a patched version for Catalyst development. #
106 # To skip this check, set the CATALYST_DEVEL_NO_510_CHECK environment #
109 #########################################################################
112 require ExtUtils::MakeMaker;
113 my $ans = ExtUtils::MakeMaker::prompt('Do you want to continue?', 'no');
114 exit 0 unless $ans =~ /^y(es)?\z/i;
119 ## BOILERPLATE ###############################################################
120 require ExtUtils::MakeMaker;
121 (do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
123 # have to do this since old EUMM dev releases miss the eval $VERSION line
124 my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
125 my $mymeta = $eumm_version >= 6.57_02;
126 my $mymeta_broken = $mymeta && $eumm_version < 6.57_07;
128 ($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g;
129 ($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g;
130 $META{license} = [ $META{license} ]
131 if $META{license} && !ref $META{license};
132 $MM_ARGS{LICENSE} = $META{license}[0]
133 if $META{license} && $eumm_version >= 6.30;
134 $MM_ARGS{NO_MYMETA} = 1
136 $MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META }
137 unless -f 'META.yml';
138 $MM_ARGS{PL_FILES} ||= {};
139 $MM_ARGS{NORECURS} = 1
140 if not exists $MM_ARGS{NORECURS};
142 for (qw(configure build test runtime)) {
143 my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
144 my $r = $MM_ARGS{$key} = {
145 %{$META{prereqs}{$_}{requires} || {}},
146 %{delete $MM_ARGS{$key} || {}},
148 defined $r->{$_} or delete $r->{$_} for keys %$r;
151 $MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
153 delete $MM_ARGS{MIN_PERL_VERSION}
154 if $eumm_version < 6.47_01;
155 $MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}}
156 if $eumm_version < 6.63_03;
157 $MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}}
158 if $eumm_version < 6.55_01;
159 delete $MM_ARGS{CONFIGURE_REQUIRES}
160 if $eumm_version < 6.51_03;
162 ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);
163 ## END BOILERPLATE ###########################################################