Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Is it possible to write to STDIN ? (fake CGI POST STDIN)

by Anonymous Monk
on Jul 21, 2014 at 07:10 UTC ( [id://1094426]=note: print w/replies, xml ) Need Help??


in reply to Is it possible to write to STDIN ?

Compile your cgi into a subroutine with CGI::Compile, wrap it with CGI::Emulate::PSGI, then install LWP::Protocol::PSGI, so you can talk to your cgi with WWW::Mechanize

Or maybe just use Test::WWW::Mechanize::CGI, it uses HTTP::Request::AsCGI

Replies are listed 'Best First'.
Re^2: Is it possible to write to STDIN ? (fake CGI POST STDIN)
by exilepanda (Friar) on Jul 21, 2014 at 07:44 UTC
    Thanks for the suggestion, however, I think I am not going to trigger any http mechanism at all (for the sake of a slow notebook with 10K+ batch requests). I just wanted to write into STDIN (if any chance or alternative approach). Just want my main script get the form like it's from server self.

      Yes, I think both parts of my answer cover both situations :) 10K+ really ain't that many :)

        Yeah I got it now =) but still do you know if there's anyway I can write into STDIN?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2024-03-28 19:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found