Re: [Catalyst] setup() called twice

2007-06-20 Thread Matt S Trout
On Wed, Jun 20, 2007 at 11:16:52AM +0100, Matt Lawrence wrote: Matt S Trout wrote: On Tue, Jun 19, 2007 at 06:19:30PM +0100, Matt Lawrence wrote: Matt S Trout wrote: Still completely broken. Read half a dozen plugins' setup methods and come back when you have a clue.

Re: [Catalyst] setup() called twice

2007-06-20 Thread Daniel McBrearty
I'm not sharing the dunce's cap though, you can get your own made. You want to be careful with those things ... they can have nasty side effects apparently : Well, one of the more mystical things Duns accepted was the wearing of conical hats to increase learning. He noted that wizards

Re: [Catalyst] setup() called twice

2007-06-19 Thread Matt Lawrence
Quinn Weaver wrote: On Mon Jun 18 20:04:09 GMT 2007, Matt Trout wrote: No it isn't. The redefine means it -isn't- called a second time. Yes it is. You can verify this by running myapp_server.pl under the debugger, or by putting lines like this in MyApp::setup: warn setup called

Re: [Catalyst] setup() called twice

2007-06-19 Thread Matt S Trout
On Tue, Jun 19, 2007 at 09:50:30AM +0100, Matt Lawrence wrote: Quinn Weaver wrote: On Mon Jun 18 20:04:09 GMT 2007, Matt Trout wrote: No it isn't. The redefine means it -isn't- called a second time. Yes it is. You can verify this by running myapp_server.pl under the debugger,

Re: [Catalyst] setup() called twice

2007-06-19 Thread Matt Lawrence
Matt S Trout wrote: On Tue, Jun 19, 2007 at 09:50:30AM +0100, Matt Lawrence wrote: What's wrong with: $_-setup for keys %{$self-_plugins}; Setup order matters. Fine, the order is known in setup(), but gets discarded. $class-setup_plugins($flags-{plugins}); ... # Call plugins'

Re: [Catalyst] setup() called twice

2007-06-19 Thread Matt S Trout
On Tue, Jun 19, 2007 at 04:52:08PM +0100, Matt Lawrence wrote: Matt S Trout wrote: On Tue, Jun 19, 2007 at 09:50:30AM +0100, Matt Lawrence wrote: What's wrong with: $_-setup for keys %{$self-_plugins}; Setup order matters. Fine, the order is known in setup(), but

Re: [Catalyst] setup() called twice

2007-06-19 Thread Matt Lawrence
Matt S Trout wrote: On Tue, Jun 19, 2007 at 04:52:08PM +0100, Matt Lawrence wrote: Matt S Trout wrote: On Tue, Jun 19, 2007 at 09:50:30AM +0100, Matt Lawrence wrote: What's wrong with: $_-setup for keys %{$self-_plugins}; Setup order matters. Fine,

Re: [Catalyst] setup() called twice

2007-06-19 Thread Chisel Wright
On Tue, Jun 19, 2007 at 05:49:45PM +0100, Matt S Trout wrote: Read half a dozen plugins' setup methods and come back when you have a clue. Ouch! No need to be like that was there? -- Chisel Wright e: [EMAIL PROTECTED] w: http://www.herlpacker.co.uk/ I wrote a todo list; Now I can

Re: [Catalyst] setup() called twice

2007-06-19 Thread Matt S Trout
On Tue, Jun 19, 2007 at 06:19:30PM +0100, Matt Lawrence wrote: Matt S Trout wrote: On Tue, Jun 19, 2007 at 04:52:08PM +0100, Matt Lawrence wrote: Matt S Trout wrote: On Tue, Jun 19, 2007 at 09:50:30AM +0100, Matt Lawrence wrote: What's wrong with: $_-setup for keys

Re: [Catalyst] setup() called twice

2007-06-19 Thread Christopher H. Laco
Matt S Trout wrote: On Tue, Jun 19, 2007 at 06:19:30PM +0100, Matt Lawrence wrote: Matt S Trout wrote: On Tue, Jun 19, 2007 at 04:52:08PM +0100, Matt Lawrence wrote: Matt S Trout wrote: On Tue, Jun 19, 2007 at 09:50:30AM +0100, Matt Lawrence wrote: What's wrong with:

Re: [Catalyst] setup() called twice

2007-06-19 Thread Bill Moseley
On Tue, Jun 19, 2007 at 07:02:42PM +0100, Matt S Trout wrote: I'd be fairly willing to say this is a bug and it should be doing { no strict 'refs'; no warnings 'redefine'; local *{${appclass}::setup} = sub { shift-NEXT::setup(@_); }; local *setup = sub {}; $app-setup;

[Catalyst] setup() called twice

2007-06-18 Thread Quinn Weaver
Hi, all, During some debugging, I noticed that MyApp::setup is called twice. This looks like an intentional feature. My question is, why? From MyApp.pm: my $ret = $self-SUPER::setup( @_ ); From Catalyst.pm: # Call plugins setup { no warnings qw/redefine/; local

Re: [Catalyst] setup() called twice

2007-06-18 Thread Matt S Trout
On Mon, Jun 18, 2007 at 11:50:06AM -0700, Quinn Weaver wrote: Hi, all, During some debugging, I noticed that MyApp::setup is called twice. This looks like an intentional feature. My question is, why? From MyApp.pm: my $ret = $self-SUPER::setup( @_ ); From Catalyst.pm: #

Re: [Catalyst] setup() called twice

2007-06-18 Thread Quinn Weaver
On Mon Jun 18 20:04:09 GMT 2007, Matt Trout wrote: On Mon, Jun 18, 2007 at 11:50:06AM -0700, Quinn Weaver wrote: Hi, all, During some debugging, I noticed that MyApp::setup is called twice. This looks like an intentional feature. My question is, why? From MyApp.pm: my $ret =