[Catalyst-commits] r13502 -
Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib
arcanez at dev.catalyst.perl.org
arcanez at dev.catalyst.perl.org
Thu Aug 19 16:16:29 GMT 2010
Author: arcanez
Date: 2010-08-19 17:16:29 +0100 (Thu, 19 Aug 2010)
New Revision: 13502
Modified:
Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst.pm
Log:
remove more $c->components in favor of Bread::Board
Modified: Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst.pm 2010-08-19 03:43:35 UTC (rev 13501)
+++ Catalyst-Runtime/5.80/branches/gsoc_breadboard/lib/Catalyst.pm 2010-08-19 16:16:29 UTC (rev 13502)
@@ -644,9 +644,8 @@
my $appclass = ref($c) || $c;
if( $name ) {
unless ( ref($name) ) { # Direct component hash lookup to avoid costly regexps
- my $comps = $c->components;
my $check = $appclass."::Controller::".$name;
- return $c->_filter_component( $comps->{$check}, @args ) if exists $comps->{$check};
+ return $c->_filter_component( $c->container->get_sub_container('controller')->get_service($check)->get, @args ) if $c->container->get_sub_container('controller')->has_service($check);
}
my @result = $c->_comp_search_prefixes( $name, qw/Controller C/ );
return map { $c->_filter_component( $_, @args ) } @result if ref $name;
@@ -682,9 +681,8 @@
my $appclass = ref($c) || $c;
if( $name ) {
unless ( ref($name) ) { # Direct component hash lookup to avoid costly regexps
- my $comps = $c->components;
my $check = $appclass."::Model::".$name;
- return $c->_filter_component( $comps->{$check}, @args ) if exists $comps->{$check};
+ return $c->_filter_component( $c->container->get_sub_container('model')->get_service($check)->get, @args ) if $c->container->get_sub_container('model')->has_service($check);
}
my @result = $c->_comp_search_prefixes( $name, qw/Model M/ );
return map { $c->_filter_component( $_, @args ) } @result if ref $name;
@@ -741,9 +739,8 @@
my $appclass = ref($c) || $c;
if( $name ) {
unless ( ref($name) ) { # Direct component hash lookup to avoid costly regexps
- my $comps = $c->components;
my $check = $appclass."::View::".$name;
- return $c->_filter_component( $comps->{$check}, @args ) if exists $comps->{$check};
+ return $c->_filter_component( $c->container->get_sub_container('view')->get_service($check)->get, @args ) if $c->container->get_sub_container('view')->has_service($check);
}
my @result = $c->_comp_search_prefixes( $name, qw/View V/ );
return map { $c->_filter_component( $_, @args ) } @result if ref $name;
More information about the Catalyst-commits
mailing list