[Catalyst-commits] r11244 -
Catalyst-Runtime/5.80/branches/register_comp_by_name/lib
rjbs at dev.catalyst.perl.org
rjbs at dev.catalyst.perl.org
Wed Aug 26 10:24:05 GMT 2009
Author: rjbs
Date: 2009-08-26 10:24:05 +0000 (Wed, 26 Aug 2009)
New Revision: 11244
Modified:
Catalyst-Runtime/5.80/branches/register_comp_by_name/lib/Catalyst.pm
Log:
explicit errors on bad COMPONENT return
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 14:45:31 UTC (rev 11243)
+++ Catalyst-Runtime/5.80/branches/register_comp_by_name/lib/Catalyst.pm 2009-08-26 10:24:05 UTC (rev 11244)
@@ -2179,7 +2179,14 @@
$class->_controller_init_base_classes($component); # Also cover inner packages
$comp = $class->setup_component($component);
- next unless $comp and $comp->isa('Catalyst::Component');
+ Catalyst::Exception->throw("$component could not be set up")
+ unless defined $comp;
+
+ unless ($comp->isa('Catalyst::Component')) {
+ Catalyst::Exception->throw(
+ "$component setup did not result in a Catalyst::Component"
+ )
+ }
$class->components->{ $comp->catalyst_component_name } = $comp;
}
}
More information about the Catalyst-commits
mailing list