Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Populate CGI from HTTP::Request wo/ using %ENV ?

by CountZero (Bishop)
on Mar 09, 2008 at 22:40 UTC ( #673143=note: print w/ replies, xml ) Need Help??


in reply to Populate CGI from HTTP::Request wo/ using %ENV ?

RFC 3875 says that the meta-variables (which include the QUERY_STRING) are passed to the script in identically named environment variables. These are accessed by the C library routine getenv() or variable environ. (item 7.2 of RFC3875).

As thus the environment variables are populated outside of your script by the server, you will have to find a way to capture these variables in a local data structure before messing around with them.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James


Comment on Re: Populate CGI from HTTP::Request wo/ using %ENV ?
Re^2: Populate CGI from HTTP::Request wo/ using %ENV ?
by ikegami (Pope) on Mar 09, 2008 at 23:29 UTC

    There's no relation between CGI (the protocol) using the environment and the need to create a CGI object from a HTTP::Request object.

    For example, CGI (the module) can already create an object from an Apache::Request object without touching the environment.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2014-11-28 00:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (190 votes), past polls