block in my httpd.conf file which installs
mod-perl handlers for a list of urls:
...
for my $uri (...) {
$Location{$uri} = ...;
}
If I wanted to move this code to a normal perl module, how should I
reference %Location?
Thanks,
ER
--0-103706503-1298932888=:85213
Content-Type: text/html; charset=us-ascii
I've seen it done where you can make a home-grown module that has a second package declaration for Apache[2]::ReadConfig. Something like ...
... in httpd.conf ...
<Perl>
use Some::Module;
Some::Module::my_custom_config();
</Perl>
... in Module.pm ...
package Some::Module;
sub my_custom_config(;){
package Apache2::ReadConfig;
<
div>
use strict;
use vars qw(
$ServerName $ServerRoot $DocumentRoot $User
$Group
@PerlChildInitHandler @PerlChildExitHandler
%DirectoryMatch %Directory %Location
...
);
for my $uri (...) {
$Location{$uri} ...
You can reference: for a bit more info as well.
Going from memory so I could be a bit rusty, but I think it's close. Hope it helps,
- Jeff
="font-family:courier, monaco, monospace, sans-serif;font-size:10pt">
face="Tahoma">
From: E R <pc88mxer@gmail.com>
To: modperl <modperl@perl.apache.org>
Sent: Mon, February 28, 2011 1:03:41 PM
Subject: How to reference %Location outside of <Perl>...</Perl>?
I have the following <Perl> block in my httpd.conf file which installs
mod-perl handlers for a list of urls:
<Perl>
...
for my $uri (...) {
$Location{$uri} = ...;
}
</Perl>
If I wanted to move this code to a normal perl module, how should I
reference %Location?
Thanks,
ER
--0-103706503-1298932888=:85213--