At 10:03 AM 10/19/99 -0700, William Deegan wrote:
>Eric Cholet wrote:
>>
>> On Tuesday, October 19, 1999 4:13 AM, William Deegan
[SMTP:[EMAIL PROTECTED]] wrote:
>> > How can I change the environment variables that get passed to a perl
>> > script running under Apache::Registry from a PerlTransHandler?
>> >
>> > I'm using the PerlTransHandler to do a sort of dynamic mod_rewrite
>> > functionality.
>>
>> Since you've got mod_perl on both sides, I'd suggest you don't use env
>> variables (which are expensive). Your Trans handler can just set
>> package variables which will be picked up by the registry script.
>> Alternatives are using $r->dir_config, or $r->notes.
>
>I'll look into that. For now though all of our scripts are set
>up to check for an enviroment variable set for some virtual hosts,
>now we'd like a way to set these same variables using a
>PerlTransHandler.
>
>So how do I go about setting the enviroment variables.
>Assuming that I don't care about the cost.
Use the %ENV hash in perl. The environment is shared between the whole
request, so setting $ENV{whatever} in the PerlTransHandler will make it
visible to the content handler down the line.
-------------------------------------------------------
Mark Cogan [EMAIL PROTECTED]
Director of Engineering +1 520-881-8101
ArtToday www.arttoday.com