From: Justin Hunter Date: Fri, 6 Aug 2010 18:38:47 +0000 (+0000) Subject: expand M/V/C to Model/View/Controller for sub-container resolution X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=ffd108e7f870ac00945bfa578389649b39a41b12 expand M/V/C to Model/View/Controller for sub-container resolution --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 3dad0df..7c03083 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -2484,6 +2484,11 @@ sub setup_components { for my $component (@comps) { my $instance = $class->components->{ $component } = $class->setup_component($component); my $type = lc((split /::/, $component)[1]); + if ($deprecatedcatalyst_component_names) { + $type = 'controller' if $type eq 'c'; + $type = 'model' if $type eq 'm'; + $type = 'view' if $type eq 'v'; + } $containers->{$type}->add_service(Bread::Board::BlockInjection->new( name => $component, block => sub { return $instance } )); my @expanded_components = $instance->can('expand_modules') ? $instance->expand_modules( $component, $config )