[Catalyst-commits] r11236 -
Catalyst-Runtime/5.80/branches/register_comp_by_name/lib
rjbs at dev.catalyst.perl.org
rjbs at dev.catalyst.perl.org
Tue Aug 25 03:10:34 GMT 2009
Author: rjbs
Date: 2009-08-25 03:10:33 +0000 (Tue, 25 Aug 2009)
New Revision: 11236
Modified:
Catalyst-Runtime/5.80/branches/register_comp_by_name/lib/Catalyst.pm
Log:
register things by component name; skip non-components
Modified: Catalyst-Runtime/5.80/branches/register_comp_by_name/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/register_comp_by_name/lib/Catalyst.pm 2009-08-25 03:09:58 UTC (rev 11235)
+++ Catalyst-Runtime/5.80/branches/register_comp_by_name/lib/Catalyst.pm 2009-08-25 03:10:33 UTC (rev 11236)
@@ -2173,10 +2173,14 @@
}
for my $component (@comps) {
- $class->components->{ $component } = $class->setup_component($component);
+ my $comp = $class->setup_component($component);
+ $class->components->{ $comp->catalyst_component_name } = $comp;
for my $component ($class->expand_component_module( $component, $config )) {
$class->_controller_init_base_classes($component); # Also cover inner packages
- $class->components->{ $component } = $class->setup_component($component);
+ $comp = $class->setup_component($component);
+
+ next unless $comp and $comp->isa('Catalyst::Component');
+ $class->components->{ $comp->catalyst_component_name } = $comp;
}
}
}
More information about the Catalyst-commits
mailing list