root/lang/perl/HTTP-Engine/trunk/Makefile.PL @ 18099

Revision 18099, 1.9 kB (checked in by tokuhirom, 6 years ago)

specify module versions

Line 
1use inc::Module::Install;
2BEGIN
3{
4    eval {
5        die "not testing mod_perl" unless $ENV{TEST_MODPERL};
6        require mod_perl2;
7        require Apache::Test;
8    };
9    {
10        no strict 'refs';
11        *HAVE_MP = $@ ? sub { 0 } : sub { 1 };
12    }
13}
14
15if (HAVE_MP) {
16    require Apache::TestMM;
17    Apache::TestMM->import(qw(clean test));
18}
19
20{
21    no warnings 'redefine';
22    *recommends_hack = $Module::Install::VERSION > 0.70 ?
23        sub { recommends(@_); $_[0] } :
24        \&recommends;
25}
26
27
28name 'HTTP-Engine';
29all_from 'lib/HTTP/Engine.pm';
30
31requires 'Moose'         => 0.55;
32requires 'MooseX::Types' => 0.04;
33requires 'Scalar::Util'  => 1.19;
34
35requires 'IO::Socket' => 1.30;
36
37requires 'File::Copy'       => 2.09;
38requires 'IO::File'         => 1.14;
39requires 'File::Spec::Unix' => 3.2701;
40
41requires 'CGI::Simple::Cookie' => 0.80;
42requires 'HTTP::Body'          => '1.04';
43requires 'HTTP::Headers'       => 5.810;
44requires 'URI'                 => 1.36;
45
46features(
47    'Interface::FCGI' => [
48        -default => 0,
49        recommends_hack('FCGI' => 0.67),
50    ],
51
52    'Interface::ServerSimple' => [
53        -default => 0,
54        recommends_hack('HTTP::Server::Simple' => 0.34),
55    ],
56
57    'Interface::Standalone' => [
58        -default => 0,
59        recommends_hack('Errno' => 1.0901),
60    ],
61
62    'Interface::Test' => [
63        -default => 0,
64        recommends_hack('IO::Scalar' => 2.110),
65    ],
66
67    'Interface::POE' => [
68        -default => 0,
69        recommends_hack('POE' => '1.0003'),
70        recommends_hack('POE::Filter::HTTPD' => 1.2387),
71    ],
72);
73
74if (HAVE_MP) {
75    Apache::TestMM::filter_args();
76    Apache::TestMM::generate_script('t/TEST');
77    tests('t/*.t t/*/*.t t/modperl/basic.t t/modperl/whole.t');
78} else {
79    tests('t/*.t t/*/*.t ');
80}
81
82build_requires 'Test::More';
83build_requires 'IO::Scalar';
84build_requires 'File::Temp' => '0.20';
85build_requires 'HTTP::Request::AsCGI';
86build_requires 'Test::TCP';
87
88use_test_base;
89auto_include;
90WriteAll;
91
Note: See TracBrowser for help on using the browser.