[cgi-prototype-users] persistent prototypes (mod_perl)

2005-06-25 Thread Ryan Tate
Hello, I recently moved a simple CGI::Prototype-based Web app over to a mod_perl2 installation. It wasn't too hard. One thing I eventually noticed: if you dispatch to objects representing particular classes, as CGI::Prototype::Hidden does (see name_to_page and its call to $package->reflect->

Re: [cgi-prototype-users] persistent prototypes (mod_perl)

2005-06-25 Thread Randal L. Schwartz
> "Ryan" == Ryan Tate <[EMAIL PROTECTED]> writes: Ryan> Hello, Ryan> I recently moved a simple CGI::Prototype-based Web app over to a Ryan> mod_perl2 installation. It wasn't too hard. That's good to hear. I tried to design CGIP with mod_perl in mind, but I had no current customers using mod_

[cgi-prototype-users] Re: persistent prototypes (mod_perl)

2005-06-25 Thread Randal L. Schwartz
> "Randal" == Randal L Schwartz writes: Randal> sub My::App::control_enter { Randal> my $self = shift; Randal> $self->reflect->addSlot(per_hit => {}); Randal> } That should be My::App::app_enter { } control_enter would cause it to get cleared as you transition from one handler to anothe

Re: [cgi-prototype-users] persistent prototypes (mod_perl)

2005-06-25 Thread Ryan Tate
Randal L. Schwartz wrote: Another way would be to put all your slots into one big "per hit" slot, and then ensure that this is cleared out: sub My::App::app_enter { my $self = shift; $self->reflect->addSlot(per_hit => {}); } I like this approach quite a bit. After reading your message, t