hi monks! I have what is hopefully a simple Catalyst 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!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.