Apache2-Connection-Arp
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
# common makefile build options
my %maker_opts = (
PREREQ_PM => $bs->mp_prereqs,
clean => { FILES => 't/TEST' },
NAME => "Apache2::Connection::Arp",
VERSION_FROM => 'lib/Apache2/Connection/Arp.pm',
ABSTRACT_FROM => 'lib/Apache2/Connection/Arp.pm',
);
$bs->WriteMakefile( %maker_opts );
package MY;
sub test {
my $self = shift;
eval { require Test::More } or return <<EOF;
test::
\t\@echo sorry, cannot run tests without Test::More
EOF
unless ($HAS_APACHE_TEST) {
return <<EOF
test::
\t\@echo
\t\@echo sorry, cannot run tests without a properly
\t\@echo configured Apache-Test environment
\t\@echo
EOF
}
require Apache::TestConfig;
my $arp = Apache::TestConfig::which('arp');
if ($arp) {
my $filename = 't/conf/extra.last.conf.in';
my $data = do { local $/; <DATA> };
my $t = Apache::TestConfig->new;
$t->writefile($filename, sprintf($data, $arp));
} else {
return <<EOF;
test::
\t\@echo
\t\@echo sorry, cannot run tests without an arp binary
\t\@echo
EOF
}
return $self->Apache::TestMM::test(@_);
}
sub clean {
my $self = shift;
return $self->Apache::TestMM::clean(@_) if $HAS_APACHE_TEST;
return $self->SUPER::clean(@_);
}
__DATA__
<IfModule mod_perl.c>
PerlSetVar arp_binary '%s'
PerlLoadModule Apache2::Connection::Arp
<Location />
SetHandler modperl
PerlResponseHandler Apache2::Connection::Arp Apache2::Const::OK
</Location>
</IfModule>
( run in 0.910 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )