perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: perl sections howto?
Date Mon, 19 Jan 2004 21:44:12 GMT
gerard uolaquetalestem wrote:
>>But, Gerard, this should work for sure:
>>use Apache::ServerUtil ();
>>my $config = <<EOI;
>><Perl >
>>$Location{'~ .*log$'} = {
>>	SetHandler => "perl-script",
>>	PerlResponseHandler => "Blogum::UserLog",
>>	PerlOptions => "+ParseHeaders",
>>	Allow => "from all",
>>	};
>></Perl>
>>EOI
>>Apache->server->add_config([split /\n/, $config]);
> 
> 
> Hey, it doesn't work for me!!
> I've tested this 
> 
> use Apache::RequestUtil(); or/and use Apache::ServerUtil();
> my $b_config = <<END;
> <Perl>
> $Location{'~ .*log$'} = {
> SetHandler => "perl-script",
> PerlResponseHandler => "Blogum::UserLog",
> PerlOptions => "+ParseHeaders",
> Allow => "from all",
> };
> </Perl>
> END
> Apache->server->add_config([split /\n/, $b_config]);

Sorry, I forgot to mention that it was untested. And it has a bug.
You need:

my $b_config = <<'END';
                  ^   ^
without '' you get $Location interpolated.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Mime
View raw message