Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: PerlSetVar and PerlPostReadRequestHandler

by redhotpenguin (Deacon)
on Dec 07, 2007 at 19:34 UTC ( #655722=note: print w/replies, xml ) Need Help??


in reply to PerlSetVar and PerlPostReadRequestHandler

In your httpd.conf, try adding the following lines:

PerlPassEnv VAR PerlPassEnv AM_I_SET

Replies are listed 'Best First'.
Re^2: PerlSetVar and PerlPostReadRequestHandler
by olus (Curate) on Dec 07, 2007 at 19:41 UTC
    I did try the PerlPassEnv just to see if things worked, and they did.
    I did manage to get the values from the %ENV.

    The thing is, I would rather not have the VAR on the environment, since every once in a while someone dumps the environment thus leaving things less safe.
    Thought PerlSetVar would be a better approach.

    --
    olus

      I don't understand what you mean when you say 'someone dumps the environment'. You could use 'SetHandler modperl' instead of 'SetHandler perl-script' in httpd.conf, it keeps %ENV from being reset between requests IIRC

        By dumping the environment I meant Dumper(\%ENV) to the browser, and that would display everything.
        I am trying to prevent some possible mistakes.

        I can use modperl as the handler for the Location that is to be aware of this VAR but still, PerlSetEnv, from the documentation, has server scope, so things will be available application wide.

        --
        olus

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://655722]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2020-06-03 13:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (24 votes). Check out past polls.

    Notices?