Re: [cgiapp] need a fresh WebApp instance with every request ?

2011-12-02 Thread Larig Tech
Hi Matthias, Sorry I didn't reply sooner; I've been away from the list for a while; coincidentally, it was working on exactly this topic that got in the way of me seeing your message :o) I'm hoping that when I'm finished I'll be allowed to release the code on CPAN so that this is much more

Re: [cgiapp] need a fresh WebApp instance with every request ?

2011-12-02 Thread Matthias Ferdinand
On Fri, Dec 02, 2011 at 01:08:24PM +, Larig Tech wrote: You've prompted me to jot down some quick notes at http://larig.wordpress.com/2011/12/02/separating-per-application-init-from-per-request-init-in-cgiapplication/ Hi, class storage is a good idea (that's why inside-out objects use it

Re: [cgiapp] need a fresh WebApp instance with every request ?

2011-12-02 Thread Matthias Ferdinand
that's what you get from coding straight into your mailer... On Fri, Dec 02, 2011 at 03:08:10PM +0100, Matthias Ferdinand wrote: # in C:A:Capsule sub cgiapp_postrun { my $self = shift; my $app = $self-{_APP_OBJECT}; # invoke MyApp teardown return

Re: [cgiapp] need a fresh WebApp instance with every request ?

2011-12-02 Thread Larig Tech
I like half your idea and hate the other half :o) I like the idea of using a persistent object to overcome deficiencies in plug-ins. That's easy with a singleton object in MyApp::Base class data blessed into C::A. I like the idea of separating your application logic from the structures in CA

Re: [cgiapp] need a fresh WebApp instance with every request ?

2011-12-02 Thread Matthias Ferdinand
On Fri, Dec 02, 2011 at 03:57:49PM +, Larig Tech wrote: I like half your idea and hate the other half :o) Of course it would not be a real solution, more like a very defensive workaround, trying not to mess with any of CA's internals. So MyApp would not _be_ a CA anymore, but only _have_ a

Re: [cgiapp] need a fresh WebApp instance with every request ?

2011-11-30 Thread Ron Savage
Hi Matthias On Wed, 2011-11-30 at 02:43 +0100, Matthias Ferdinand wrote: On Wed, Nov 30, 2011 at 11:01:04AM +1100, Ron Savage wrote: Hi Matthias On Sun, 2011-11-27 at 17:24 +0100, Matthias Ferdinand wrote: I could not find in CGI::Application's docs if a single instance object is

Re: [cgiapp] need a fresh WebApp instance with every request ?

2011-11-29 Thread Ron Savage
Hi Matthias On Sun, 2011-11-27 at 17:24 +0100, Matthias Ferdinand wrote: I could not find in CGI::Application's docs if a single instance object is capable of handling multiple requests (i.e. has run() invoked several times) or not. I'm a bit surprised you haven't had an answer by now. IMHO

Re: [cgiapp] need a fresh WebApp instance with every request ?

2011-11-29 Thread Matthias Ferdinand
On Wed, Nov 30, 2011 at 11:01:04AM +1100, Ron Savage wrote: Hi Matthias On Sun, 2011-11-27 at 17:24 +0100, Matthias Ferdinand wrote: I could not find in CGI::Application's docs if a single instance object is capable of handling multiple requests (i.e. has run() invoked several times)

[cgiapp] need a fresh WebApp instance with every request ?

2011-11-27 Thread Matthias Ferdinand
Hello all, I am writing a CGI application and I am facing issues with variable persistence between requests: a) using redirect() (from CGI::Application::Plugin::Redirect) leads to a subsequent Redirect loop ( $self-{__HEADER_PROPS} ) b) using prerun_mode() will lock subsequent