Looking at Plack::Handler::Apache2, your app now runs under mod_perl.

As I assume that your PSGI application is more or less a raw PSGI application, returning [200, {}, ["Hello World"]], maybe you have Apache set up to restart the httpd after each request, which is great for debugging.

The easiest way to better confirm that your program is not run as a separate process would be some shared state between requests:

my $counter= 1; warn "(Re)initializing application $0\n"; return sub { [200, {}, ["Hello request " . $counter++]] };

If you cannot make $counter++ increase and constantly see the "(Re)initializing" message in your webserver error log, your webserver is running each request in a separate request.

You should get really different behaviour by using plackup with (for example) the Twiggy, Tatsumaki or another in-process backend.


In reply to Re: Working towards PSGI, some questions by Corion
in thread Working towards PSGI, some questions by Cody Fendant

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.