stas 2003/06/08 23:05:14
Modified: src/docs/2.0/api/Apache PerlSections.pod
Log:
- s/<Perl>/<Perl >/
- indent code 4 chars
Revision Changes Path
1.4 +16 -15 modperl-docs/src/docs/2.0/api/Apache/PerlSections.pod
Index: PerlSections.pod
===================================================================
RCS file: /home/cvs/modperl-docs/src/docs/2.0/api/Apache/PerlSections.pod,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- PerlSections.pod 9 Jun 2003 06:02:17 -0000 1.3
+++ PerlSections.pod 9 Jun 2003 06:05:14 -0000 1.4
@@ -31,13 +31,13 @@
<Perl>
$Location{"/~dougm/"} = {
- AuthUserFile => '/tmp/htpasswd',
- AuthType => 'Basic',
- AuthName => 'test',
+ AuthUserFile => '/tmp/htpasswd',
+ AuthType => 'Basic',
+ AuthName => 'test',
DirectoryIndex => [qw(index.html index.htm)],
- Limit => {
- METHODS => 'GET POST',
- require => 'user dougm',
+ Limit => {
+ METHODS => 'GET POST',
+ require => 'user dougm',
},
};
@@ -83,19 +83,20 @@
configuration. For example to solve the problem of the C<ServerName>
directive you might have this C<E<lt>Perl E<gt>> section:
- <Perl>
+ <Perl >
$ServerName = `hostname`;
</Perl>
For example if you want to allow personal directories on all machines
except the ones whose names start with I<secure>:
- <Perl>
+ <Perl >
$ServerName = `hostname`;
- if ( $ServerName !~ /^secure/) {
- $UserDir = "public.html";
- } else {
- $UserDir = "DISABLED";
+ if ($ServerName !~ /^secure/) {
+ $UserDir = "public.html";
+ }
+ else {
+ $UserDir = "DISABLED";
}
</Perl>
@@ -137,9 +138,9 @@
And in My/PerlSection/Handler.pm:
sub My::Handler::handler : handler {
- my($self, $parms, $args) = @_;
- #do your thing!
- }
+ my($self, $parms, $args) = @_;
+ #do your thing!
+ }
So, when that given C<E<lt>Perl E<gt>> block in encountered, the code
within will first be evaluated, then the handler routine will be
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]