Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: faking out CGI.pm

by thezip (Vicar)
on Dec 19, 2007 at 23:52 UTC ( #658013=note: print w/ replies, xml ) Need Help??


in reply to faking out CGI.pm

To expand on Joost's suggestion, you could create a file containing the pre-specified NAME=VALUE pairs.

__DATA__ foo_field=foo's_value bar_field=bar's_value ...
Then, it's just a matter of getting a filehandle and instantiating a CGI object with it:
open(IFH, $CGI_filename) || die ... my $query = CGI->new(IFH); my $field = $query->param('foo_field'); print $field, "\n"; __OUTPUT__ foo's_value

Your wish is my commandline.


Comment on Re: faking out CGI.pm
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2014-11-28 09:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (194 votes), past polls