Apache-Test
view release on metacpan or search on metacpan
remove Apache::TestConfig::modperl_2_inc_fixup(). Apache-Test
is no longer Apache2.pm aware - it will not configure mod_perl
support to look in Apache2/ automatically. [joes]
Add support for mp2's Apache:: -> Apache2:: rename [joes]
=item 1.21 - March 23, 2005
fix Apache::TestConfig (was missing 'use lib' before using
lib::import) [William McKee <william@knowmad.com>]
TestConfigPerl will now configure mod_perl last, giving mod_perl
highest priority throughout the httpd lifecycle. [Geoffrey Young]
Apache::TestConfig::untaint_path needs to remove empty entries in the
PATH list, since -T considers those tainted too. [Stas]
add Apache::TestHarnessPHP which allows for running client-side
scripts via php instead of perl. [Geoffrey Young]
pre-installed occurrences of Apache/test.pm, which has been renamed to
Apache/testold.pm in mod_perl 1.28 to avoid collisions with
Apache/Test.pm on case-insensitive systems. [Stas]
Apache::TestClient now handles correctly responses with no body and
its response header() method is no longer case-sensitive [Stas]
add skip helper shortcuts: have_min_perl_version,
have_min_module_version [Stas]
pass to 'use lib' only 'lib/' dirs that actually exist in
autogenerated t/TEST t/SMOKE and others. [Stas]
add the ASF LICENSE file to the distro [Stas]
get rid of Apache::TestTrace's dependency on Apache::TestConfig as it
creates too many circular use() problems. [Stas]
wrap blib loading in eval block (added to autogenerated files), to
prevent 'make clean' failures. [Stas]
Makefile.PL view on Meta::CPAN
use 5.005;
use lib qw(lib);
use Apache::Test5005compat;
use strict;
use warnings;
# was this file invoked directly via perl, or via the top-level
# (mp2) Makefile.PL? if top-level, this env var will be set
use constant TOP_LEVEL => $ENV{MOD_PERL_2_BUILD};
if (!TOP_LEVEL) {
lib/Apache/TestBuild.pm view on Meta::CPAN
$INC{'Apache/TestBuild.pm'} = __FILE__;
eval join '', <DATA>;
die $@ if $@;
}
1;
__DATA__
use strict;
use warnings FATAL => 'all';
use lib qw(Apache-Test/lib);
use Apache::TestBuild ();
use Getopt::Long qw(GetOptions);
use Cwd ();
my %options = (
prefix => "checkout/build/install prefix",
ssldir => "enable ssl with given directory",
cvstag => "checkout with given cvs tag",
cvsroot => "use 'anon' for anonymous cvs",
version => "apache version (e.g. '2.0')",
lib/Apache/TestConfig.pm view on Meta::CPAN
use constant IS_MOD_PERL_2 =>
eval { require mod_perl2 } || 0;
use constant IS_MOD_PERL_2_BUILD => IS_MOD_PERL_2 &&
eval { require Apache2::Build && Apache2::Build::IS_MOD_PERL_BUILD() };
use constant IS_APACHE_TEST_BUILD =>
grep { -e "$_/lib/Apache/TestConfig.pm" }
qw(Apache-Test . .. ../Apache-Test);
use lib ();
use File::Copy ();
use File::Find qw(finddepth);
use File::Basename qw(dirname);
use File::Path ();
use File::Spec::Functions qw(catfile abs2rel splitdir canonpath
catdir file_name_is_absolute devnull);
use Cwd qw(fastcwd);
use Socket ();
use Symbol ();
lib/Apache/TestConfig.pm view on Meta::CPAN
push @dirs, canonpath $FindBin::Bin;
my $dirs = join("\n ", '', @dirs) . "\n";;
return <<"EOF";
use strict;
use warnings FATAL => 'all';
use lib qw($dirs);
EOF
}
# gen + write executable perl script file
sub write_perlscript {
my($self, $file, $content) = @_;
my $fh = $self->genfile($file, undef, 1);
lib/Apache/TestConfigPerl.pm view on Meta::CPAN
# this ignores coverage data for some generated files
Devel::Cover->import('+inc' => 't/response/',);
1;
} or die "Devel::Cover error: $@";
}
EOF
return <<"EOF";
BEGIN {
use lib '$serverroot';
for my \$file (qw(modperl_inc.pl modperl_extra.pl)) {
eval { require "conf/\$file" } or
die if grep { -e "\$_/conf/\$file" } \@INC;
}
$cover
}
1;
EOF
lib/Apache/TestConfigPerl.pm view on Meta::CPAN
sub configure_startup_pl {
my $self = shift;
#for 2.0 we could just use PerlSwitches -Mlib=...
#but this will work for both 2.0 and 1.xx
if (my $inc = $self->{inc}) {
my $include_pl = catfile $self->{vars}->{t_conf}, 'modperl_inc.pl';
my $fh = $self->genfile($include_pl);
for (reverse @$inc) {
next unless $_;
print $fh "use lib '$_';\n";
}
my $tlib = catdir $self->{vars}->{t_dir}, 'lib';
if (-d $tlib) {
print $fh "use lib '$tlib';\n";
}
# directory for temp packages which can change during testing
# we use require here since a circular dependency exists
# between Apache::TestUtil and Apache::TestConfigPerl, so
# use does not work here
eval { require Apache::TestUtil; };
if ($@) {
die "could not require Apache::TestUtil: $@";
} else {
print $fh "use lib '" . Apache::TestUtil::_temp_package_dir() . "';\n";
}
# if Apache::Test is used to develop a project, we want the
# project/lib directory to be first in @INC (loaded last)
if ($ENV{APACHE_TEST_LIVE_DEV}) {
my $dev_lib = catdir $self->{vars}->{top_dir}, "lib";
print $fh "use lib '$dev_lib';\n" if -d $dev_lib;
}
print $fh "1;\n";
}
if ($self->server->{rev} >= 2) {
$self->postamble(IfModule => 'mod_perl.c',
"PerlSwitches -Mlib=$self->{vars}->{serverroot}\n");
}
lib/Apache/TestSmoke.pm view on Meta::CPAN
=head1 t/SMOKE.PL
I<t/SMOKE.PL> is driving this module, if you don't have it, create it:
#!perl
use strict;
use warnings FATAL => 'all';
use FindBin;
use lib "$FindBin::Bin/../Apache-Test/lib";
use lib "$FindBin::Bin/../lib";
use Apache::TestSmoke ();
Apache::TestSmoke->new(@ARGV)->run;
usually I<Makefile.PL> converts it into I<t/SMOKE> while adjusting the
perl path, but you create I<t/SMOKE> in first place as well.
=head1 AUTHOR
use strict;
use lib qw(lib ../lib);
use warnings FATAL => 'all';
use Apache::TestRun ();
package MyTest;
use vars qw(@ISA);
@ISA = qw(Apache::TestRun);
t/conf/modperl_extra.pl.in view on Meta::CPAN
use strict;
use warnings FATAL => qw(all);
use File::Spec ();
use lib (); # empty so we can calculate the lib to use
my @libs = (File::Spec->catfile('@ServerRoot@', 'response'),
File::Spec->catfile('@ServerRoot@', qw(.. lib)));
lib->import(@libs);
1;
( run in 0.388 second using v1.01-cache-2.11-cpan-87723dcf8b7 )