Hello Catalyst users and developers, I'll get straight to the point: I have this idea for providing the ability to modify the component load order in Catalyst.
So there's this snippet of code here that currently determines
component load order in Catalyst 5.80024:
sub setup_components {
### code ###
my @comps = sort { length $a <=> length $b }
$class->locate_components($config);
### more code ###
}
My current proposal is just to add this:
sub determine_component_load_order {
shift;
return sort { length $a <=> length $b } @_;
}
### later on in setup_components
my @comps =
$class->determine_component_load_order($class->locate_components($config));
This way, applications requiring a custom load order can override
determine_component_load_order if they which,
and plugins can override it to provide cool features like dependency resolution.
Thoughts?
-Rob
PS. If you're curious, the reason I'm doing is is so I can use a
Catalyst::Model::DBIC::Schema in a Template::Provider::DBIC
to load templates for a Catalyst::View::TT.
--
Rob Hoelz
Software Engineer I
INOC
608.663.4555 x207
608.663.4558 fax
[email protected]
www.inoc.com
*** DELIVERING UPTIME ***
signature.asc
Description: PGP signature
_______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
