Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: In CGI::Application cgiapp_prerun vs. cgiapp_init?

by saberworks (Curate)
on Jul 17, 2012 at 20:52 UTC ( [id://982332]=note: print w/replies, xml ) Need Help??


in reply to Re: In CGI::Application cgiapp_prerun vs. cgiapp_init?
in thread In CGI::Application cgiapp_prerun vs. cgiapp_init?

I know this is an old thread, but I ran into an issue under mod_perl where cgiapp_init was being called on every request, not just at server (or process) start. I did some searches and found this: http://old.nabble.com/cgi%3A%3Aapplication%3A%3Adispatch-and-modperl-td29916199.html Summary: they're both called on every request. Not sure if it's a change since this thread was posted but the information here doesn't seem to be correct.
  • Comment on Re^2: In CGI::Application cgiapp_prerun vs. cgiapp_init?

Replies are listed 'Best First'.
Re^3: In CGI::Application cgiapp_prerun vs. cgiapp_init?
by Anonymous Monk on Jul 18, 2012 at 01:21 UTC
      Ah, it's so blindingly obvious when you point it out, thanks for this. Of course I'm doing exactly what your first example shows, but not for long.

        Well, apparently, (I guesstimate) since (some time around) CGI::Application 3.x it is no longer recommended to reuse CGI::Application objects, no longer recommended to call run repeatedly, as Bug #72909 for CGI-Application: persistence issues says CGI::Application is designed to have a new object created on each request. which is an assumption various ::Plugins and extensions make, so its best to play along and not reuse an object and not ->run ->run ->run

        You probably discovered this on your own :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-26 00:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found