You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by Brat Wizard <br...@naxs.com> on 2002/08/11 18:14:34 UTC

Answer-- Re: Q: How to access Apache Request ($r) from Apache::ASP??

Hello there-

In the event that there are other dimwits (like me) lurking on this list, I 
thought I'd share what I learned...

The Apache->request structure is but a simple call away-- it lies just under 
the surface of the Apache::ASP code and can be easily constructed with the 
following syntax:

my $r = Apache->request;

Then the $r variable may be used in the manner described in the "Writing 
Apache Modules in Perl & C". (Apache Handlers in Perl)

This allows you to set a variable in the Apache httpd.conf file like so:

<some_container blah..blah>
  PerlSetVar foo bar
</some_container>

Then in your Apache::ASP code you can access it thusly:

my $r = Apache->request;
my $foo = $r->dir_config('foo');
print "foo = $foo";

Thanks to Ellers for giving me the clue that allowed me to unravel the answer.

Regards,

John


On Friday 09 August 2002 10:50 am, Brat Wizard spewed into the ether:
> Q: How to access Apache Request ($r) from Apache::ASP??
>
> Thanks
>
> John
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
> For additional commands, e-mail: asp-help@perl.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org