|


| NAVIGATION |
|
Home |
|
Store |
|
|
| INSIDE MAC |
|
Television Shows |
|
Broadcast Shows |
|
Daily News Shows |
|
Special Shows |
|
|
| EVENTS |
|
|
|
|
|
|
|
|
| DAILY TIPS |
|
Design |
|
Mac OS X |
|
Mac OS X UNIX |
|
|
| COMMUNITY |
|
Forums |
|
Surveys |
|
|
| NEWS |
|
Current |
|
Press |
|
Archive |
|
|
| FEATURES |
|
Editorial |
|
Dr. Mac |
|
Reviews |
|
Reader Reports |
|
|
| RESOURCES |
|
FAQ |
|
Documentation |
|
Learning Center |
|
MAN pages |
|
Glossary |
|
Tutorials |
|
Tips |
|
Links |
|
|
|

|
|
|
Apache::PerlSections - Utilities for work with <Perl> sec-
tions
SYNOPSIS
use Apache::PerlSections ();
DESCRIPTION
It is possible to configure you server entirely in Perl
using <Perl> sections in httpd.conf. This module is here
to help you with such a task.
METHODS
dump
This method will dump out all the configuration vari-
ables mod_perl will be feeding the the apache config
gears. The output is suitable to read back in via
`eval'.
Example:
<Perl>
use Apache::PerlSections ();
$Port = 8529;
$Location{"/perl"} = {
SetHandler => "perl-script",
PerlHandler => "Apache::Registry",
Options => "ExecCGI",
};
@DocumentIndex = qw(index.htm index.html);
$VirtualHost{"www.foo.com"} = {
DocumentRoot => "/tmp/docs",
ErrorLog => "/dev/null",
Location => {
"/" => {
Allowoverride => 'All',
Order => 'deny,allow',
Deny => 'from all',
Allow => 'from foo.com',
},
},
};
print Apache::PerlSections->dump;
</Perl>
#scalars:
$Port = 8529;
#arrays:
@DocumentIndex = (
'index.htm',
'index.html'
);
#hashes:
%Location = (
'/perl' => {
PerlHandler => 'Apache::Registry',
SetHandler => 'perl-script',
Options => 'ExecCGI'
}
);
%VirtualHost = (
'www.foo.com' => {
Location => {
'/' => {
Deny => 'from all',
Order => 'deny,allow',
Allow => 'from foo.com',
Allowoverride => 'All'
}
},
DocumentRoot => '/tmp/docs',
ErrorLog => '/dev/null'
}
);
1;
__END__
store
This method will call the `dump' method, writing the
output to a file, suitable to be pulled in via
`require'.
Example:
Apache::PerlSections->store("httpd_config.pl");
require 'httpd_config.pl';
mod_perl(1), Data::Dumper(3), Devel::Symdump(3)
AUTHOR
Doug MacEachern
|





|
 |
|
 |
Copyright © 2000-2008 Inside Mac Media, Inc. All rights reserved. |
Apple assumes no responsibility with regard to the selection, performance, or use of the products or services. All understandings, agreements, or warranties, if any, take place directly between the vendors and prospective users. |
| Apple, the Apple logo, Mac, PowerMac G4, PowerMac G5, Xserve, Xserve RAID, PowerBook, iBook, Airport, AirPort Extreme, iMac, eMac, iLife, iMovie, iCal, iPhoto, iTunes, QuickTime, FireWire, iPod, iSight, AppleWorks, Macintosh, Jaguar, Panther, Mac OS, Mac OS X and Mac OS X Server are trademarks of Apple Computer, Inc. |
|