PerlModule Apache::Module
### --------------------------------- ###
push @Alias, ['/perl_sections', '@DocumentRoot@'];
$Location{'/perl_sections'} = {
'PerlInitHandler' => 'ModPerl::Test::add_config',
'AuthType' => 'Basic',
'AuthName' => 'PerlSection',
'PerlAuthenHandler' => 'TestHooks::authen_basic',
};
#Test tied %Location
use ModPerl::TestTiePerlSection ();
tie %Location, 'ModPerl::TestTiePerlSection';
$Location{'/tied'} = 'test_tied';
$Apache::PerlSections::Save = 1;
$Location{'/perl_sections_saved'} = {
'AuthName' => 'PerlSection',
};
#This is a comment
$TestDirective::perl::comments="yes";
$TestDirective::perl::PACKAGE = __PACKAGE__;
$Apache::PerlSections::Save = 1;
$TestDirective::perl::filename = __FILE__;
$TestDirective::perl::dollar_zero = $0;
$TestDirective::perl::line = __LINE__;
#Handle re-entrant sections
use File::Spec;
my $file = File::Spec->catfile('@ServerRoot@', 'conf', 'perlsection.conf');
open my $fh, ">$file" or die "Can't open $file: $!";
print $fh join "\n", ('', '$TestDirective::perl::Included++;', '');
close $fh;
$Include = $file;
#Deprecated access to Apache::ReadConfig:: still works
push @Apache::ReadConfig::Alias,
['/perl_sections_readconfig', '@DocumentRoot@'];
$Apache::ReadConfig::Location{'/perl_sections_readconfig'} = {
'PerlInitHandler' => 'ModPerl::Test::add_config',
'AuthType' => 'Basic',
'AuthName' => 'PerlSection',
'PerlAuthenHandler' => 'TestHooks::authen_basic',
};
### --------------------------------- ###
Perl $TestDirective::perl::worked="yes";
### --------------------------------- ###
=pod
This is some pod data
=over apache
PerlSetVar TestDirective__pod_over_worked yes
=back
This is some more pod
=cut
PerlSetVar TestDirective__pod_cut_worked yes