From: John Napiorkowski Date: Fri, 8 May 2015 20:32:33 +0000 (-0500) Subject: fixed a bug with expand components and subcomponents X-Git-Tag: 5.90091~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=8860df07ae2b5744c24343879d87c2b8f6e945cb fixed a bug with expand components and subcomponents --- diff --git a/Changes b/Changes index 3b38a32..fe57228 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,10 @@ # This file documents the revision history for Perl extension Catalyst. +5.90091 - 2014-05-08 + - Fixed a bug where if an injected component expanded sub components, those + sub components would not show up in the startup debug dev console ( + even though they were actually created). + 5.90090 - 2014-04-29 - Updated some documention in Catalyst::Request::Upload to clarify behavior that RT ticket reported as confusing or unexpected diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 1613589..358e7c7 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -1384,6 +1384,7 @@ EOF : $class->log->debug(q/Couldn't find home/); my $column_width = Catalyst::Utils::term_width() - 8 - 9; + my $t = Text::SimpleTable->new( [ $column_width, 'Class' ], [ 8, 'Type' ] ); for my $comp ( sort keys %{ $class->components } ) { my $type = ref $class->components->{$comp} ? 'instance' : 'class'; @@ -2853,10 +2854,10 @@ sub setup_components { # of named components in the configuration that are not actually existing (not a # real file). - my @injected_components = $class->setup_injected_components; + $class->setup_injected_components; # All components are registered, now we need to 'init' them. - foreach my $component_name (@comps, @injected_components) { + foreach my $component_name (keys %{$class->components||+{}}) { $class->components->{$component_name} = $class->components->{$component_name}->() if (ref($class->components->{$component_name}) || '') eq 'CODE'; } @@ -2877,8 +2878,6 @@ sub setup_injected_components { $injected_comp_name, $class->config->{inject_components}->{$injected_comp_name}); } - - return @injected_components; } =head2 $app->setup_injected_component( $injected_component_name, $config ) diff --git a/lib/Catalyst/Delta.pod b/lib/Catalyst/Delta.pod index 76d8cf7..1366f09 100755 --- a/lib/Catalyst/Delta.pod +++ b/lib/Catalyst/Delta.pod @@ -7,9 +7,18 @@ Catalyst::Delta - Overview of changes between versions of Catalyst This is an overview of the user-visible changes to Catalyst between major Catalyst releases. +=head2 VERSION 5.90091 + +=head3 'case_sensitive' configuration + +At one point in time we allowed you to set a 'case_sensitive' configuraion value so +that you could find actions by their private names using mixed case. We highly +discourage that. If you are using this 'feature' you should be on notice that we +plan to remove the code around it in the near future. + =head2 VERSION 5.90090+ -=head2 Type constraints on Args and CaptureArgs. +=head3 Type constraints on Args and CaptureArgs. You may now use a type constraint (using L, L or preferably L in your Args or CaptureArgs action attributes. This can be used @@ -24,12 +33,12 @@ your arguments to $c->uri_for(...) must match those constraints. See L for more. -=head2 Move CatalystX::InjectComponent into core +=head3 Move CatalystX::InjectComponent into core L has a new method 'inject_component' which works the same as the method of the same name in L. -=head2 inject_components +=head3 inject_components New configuration key allows you to inject components directly into your application without any subclasses. For example: @@ -48,7 +57,7 @@ any subclasses. For example: Injected components are useful to reduce the ammount of nearly empty boilerplate classes you might have, particularly when first starting an application. -=head2 Component setup changes. +=head3 Component setup changes. Previously you could not depend on an application scoped component doing setup_components since components were setup 'in order'. Now all components are first registered and then