[Catalyst] component's new() call browser dependent
Juan Camacho
jc5826 at gmail.com
Mon Jan 14 00:41:04 GMT 2008
On Jan 13, 2008 7:17 PM, Jonathan Rockway <jon at jrock.us> wrote:
>
>
> On Sun, 2008-01-13 at 19:11 -0500, Juan Camacho wrote:
> > I found something quite strange. When I use Firefox the model's new
> > method is called for each request, but if I use IE it doesn't. This
> > is under mod_perl. Is this behavior by design? Have I missed some
> > documentation on this?
>
> Can you provide a test case (just some code I can run to try to
> reproduce this)? It would be best if this works against the dev server
> instead of mod_perl.
>
I've been simply printing to STDERR in my model new method, e.g.
use strict;
use warnings;
use base qw|Catalyst::Component::ACCEPT_CONTEXT Catalyst::Model
Class::Accessor::Fast|;
use NEXT;
package MyApp::Model::Foo;
sub new {
my $self = shift->NEXT::new(@_);
print STDERR __PACKAGE__ . "::new called";
return $self;
}
sub something_else { print STDERR "something_else called\n" }
Do you still need some code? Should new be called for every request or
is there some intentional session caching going on?
Juan
More information about the Catalyst
mailing list