List Info

Thread: Re: setup() called twice




Re: setup() called twice
country flaguser name
United Kingdom
2007-06-19 10:52:08
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->);

...

# Call plugins' setup
$_->setup for {delete $flags-> || []};

Or if it doesn't matter it this happens earlier in the setup
process, it
could be part of setup_plugins.

That way, you call setup once for each plugin, regardless of
what
happens to be in MyApp::ISA.


Matt


_______________________________________________
List: Catalystlists.rawmode.org
Listinfo: ht
tp://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-
archive.com/catalystlists.rawmode.org/
Dev site: http://dev.catalyst.per
l.org/

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )