damian45 has asked for the wisdom of the Perl Monks concerning the following question:
Scripts written using CGI::Fast can normally have persistent variables, basically anything declared outside of the request loop is persitent between requests for the life of the process.
Can someone please tell me how I can do this with Catalyst when I'm using its FCGI engine?
Basically I want to be able to create variables such as $COUNTER below.
use CGI::Fast qw(:standard); $COUNTER = 0; while (new CGI::Fast) { print header; print start_html("Fast CGI Rocks"); print h1("Fast CGI Rocks"), "Invocation number ",b($COUNTER++), " PID +",b($$),".", hr; print end_html; }
I've searched for this, but if it's out there I'm not finding it. thanks monks in advance! cheers!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Catalyst fcgi engine w. persistent variables
by Your Mother (Archbishop) on Jul 07, 2011 at 17:42 UTC | |
by damian45 (Novice) on Jul 07, 2011 at 18:31 UTC | |
by Your Mother (Archbishop) on Jul 07, 2011 at 21:20 UTC | |
by damian45 (Novice) on Jul 07, 2011 at 19:24 UTC |