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

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

current Interface::Test uses IO::Scalar.

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';
34
35requires 'IO::Socket' => 1.30;
36
37requires 'File::Copy';
38requires 'IO::File' => 1.14;
39requires 'File::Spec::Unix';
40
41requires 'CGI::Simple::Cookie';
42requires 'HTTP::Body' => '1.04';
43requires 'HTTP::Headers';
44requires 'URI' => 1.36;
45requires 'URI::QueryParam';
46
47features(
48    'Interface::FCGI' => [
49        -default => 0,
50        recommends_hack('FCGI' => 0.67),
51    ],
52
53    'Interface::ServerSimple' => [
54        -default => 0,
55        recommends_hack('HTTP::Server::Simple' => 0.34),
56    ],
57
58    'Interface::Standalone' => [
59        -default => 0,
60        recommends_hack('Errno'),
61    ],
62
63    'Interface::Test' => [
64        -default => 0,
65        recommends_hack('IO::Scalar'),
66    ],
67
68    'Interface::POE' => [
69        -default => 0,
70        recommends_hack('POE' => '1.0003'),
71        recommends_hack('POE::Filter::HTTPD' => 1.2387),
72    ],
73);
74
75if (HAVE_MP) {
76    Apache::TestMM::filter_args();
77    Apache::TestMM::generate_script('t/TEST');
78    tests('t/*.t t/*/*.t t/modperl/basic.t t/modperl/whole.t');
79} else {
80    tests('t/*.t t/*/*.t ');
81}
82
83build_requires 'Test::More';
84build_requires 'IO::Scalar';
85build_requires 'File::Temp' => '0.20';
86build_requires 'HTTP::Request::AsCGI';
87build_requires 'Test::TCP';
88
89use_test_base;
90auto_include;
91WriteAll;
92
Note: See TracBrowser for help on using the browser.