Apache-EnvDir
view release on metacpan or search on metacpan
EnvDir.xs
Makefile.PL
MANIFEST
README
t/01base.t
t/02cgi.t
t/02perl.t
t/03envdir-cgi.t
t/03envdir.t
t/cgi/all.pl.PL
t/cgi/content-type.pl.PL
t/cgi/env.pl.PL
t/conf/extra.conf.in
t/htdocs/index.html
t/TEST.PL
t/03envdir-include.t
t/04empty.t
t/05noprefix.t
Makefile.PL view on Meta::CPAN
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
NAME => 'Apache::EnvDir',
VERSION_FROM => 'EnvDir.pm', # finds $VERSION
PREREQ_PM => {}, # e.g., Module::Name => 1.1
ABSTRACT => 'Set ENV variables from a directory of files.',
AUTHOR => 'Mike Cramer <cramer@webkist.com>',
INC => Apache::src->new->inc,
clean => { FILES => "t/TEST t/envdir main.xs main.xs.orig t/conf/apache_test_config.pm t/conf/extra.conf t/conf/httpd.conf t/conf/modperl_inc.pl t/conf/modperl_startup.pl t/logs t/core t/cgi/all.pl t/cgi/content-type.pl t/cgi/env.pl t/cgi...
);
sub MY::test {
eval {
require Apache::Test;
require Apache::TestMM;
require Apache::TestRunPerl;
require File::Find;
Apache::TestMM->import(qw(test clean));
use Apache::Test qw(plan ok have_lwp have_module);
use Apache::TestRequest qw(GET);
use Apache::TestUtil qw(t_cmp);
# test CleanLevel
my $module = "cgi";
plan tests => 4, [$module];
my $response;
$response = GET "/$module/content-type.pl?ct=text/html";
ok ($response->code == 200
&& $response->content_type =~ m|text/html|
&& $response->content =~ m|^\s*<b>ok</b>\s*$|);
$response = GET "/$module/content-type.pl?ct=text/plain";
ok ($response->code == 200
&& $response->content_type =~ m|text/plain|
&& $response->content =~ m|^\s*<b>ok</b>\s*$|);
$response = GET "/$module/all.pl";
ok ($response->code == 200
&& $response->content_type =~ m|text/plain|);
$response = GET "/$module/env.pl?env=QUERY_STRING";
ok ($response->code == 200
use Apache::Test qw(plan ok have_lwp have_module);
use Apache::TestRequest qw(GET);
use Apache::TestUtil qw(t_cmp);
# test CleanLevel
my $module = "perl";
plan tests => 4, [$module];
my $response;
$response = GET "/$module/content-type.pl?ct=text/html";
ok ($response->code == 200
&& $response->content_type =~ m|text/html|
&& $response->content =~ m|^\s*<b>ok</b>\s*$|);
$response = GET "/$module/content-type.pl?ct=text/plain";
ok ($response->code == 200
&& $response->content_type =~ m|text/plain|
&& $response->content =~ m|^\s*<b>ok</b>\s*$|);
$response = GET "/$module/all.pl";
ok ($response->code == 200
&& $response->content_type =~ m|text/plain|);
$response = GET "/$module/env.pl?env=QUERY_STRING";
ok ($response->code == 200
( run in 3.935 seconds using v1.01-cache-2.11-cpan-524268b4103 )