1use Module::Build; 2 3my $have_apache_test = 0; 4my $build_pkg = 'Module::Build'; 5eval "require Apache::Test"; 6unless( $@ ) { 7 $build_pkg = 'Apache::TestMB'; 8 $have_apache_test = 1; 9} 10 11eval "require $build_pkg"; 12my $build = $build_pkg->new( 13 module_name => 'CGI::Application::Dispatch', 14 license => 'perl', 15 configure_requires => { 'Module::Build' => 0.38 }, 16 requires => { 17 'perl' => '5.6.0', 18 # a new 'version' is only required to solve rare install problem. 19 # https://rt.cpan.org/Ticket/Display.html?id=56283 20 'version' => 0.82, 21 'CGI::Application' => '4.50', # For native PSGI support. 22 'HTTP::Exception' => 0, 23 'Exception::Class' => 1.2, 24 'Try::Tiny' => 0, 25 }, 26 build_requires => { 27 'CGI::PSGI' => 0, # recommended by CGI::Application, but not required. We still need it at least to test with. 28 'Test::More' => 0, 29 'Test::LongString' => 0, 30 'Plack' => 0.9956, # really, we just depend on Plack::Test, but Plack::Test has not declared a version. 31 $have_apache_test ? ( 'Apache::Test' => 0 ) : (), 32 }, 33 meta_merge => { 34 resources => { 35 repository => 'https://github.com/markstos/CGI--Application--Dispatch', 36 }, 37 }, 38); 39 40$build->create_build_script; 41 42