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' setup
$_->setup for @{delete $flags->{plugins} || []};
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: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/