X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FUtils.pm;h=fc877d430fd75bfd57343427853ba3a3044f23ea;hp=db890638bf7bced60370795430d4a7fe3319fe4d;hb=807303a1658f895c41417beba24d24ff9b71c194;hpb=cbe627b901f8e459035a76d423229694e1fefbff diff --git a/lib/Catalyst/Utils.pm b/lib/Catalyst/Utils.pm index db89063..fc877d4 100644 --- a/lib/Catalyst/Utils.pm +++ b/lib/Catalyst/Utils.pm @@ -413,11 +413,14 @@ sub term_width { } else { warn "There was an error trying to detect your terminal size: $@\n"; } + }; + + unless ($width) { warn 'Trouble trying to detect your terminal size, looking at $ENV{COLUMNS}'."\n"; $width = $ENV{COLUMNS} if exists($ENV{COLUMNS}) && $ENV{COLUMNS} =~ m/^\d+$/; - }; + } do { warn "Cannot determine desired terminal width, using default of 80 columns\n"; @@ -575,13 +578,10 @@ sub inject_component { my $_setup_component = sub { my $into = shift; my $component_package = shift; - $into->components->{$component_package} = $into->setup_component( $component_package ); + $into->components->{$component_package} = $into->delayed_setup_component( $component_package ); }; $_setup_component->( $into, $component_package ); - for my $inner_component_package ( Devel::InnerPackage::list_packages( $component_package ) ) { - $_setup_component->( $into, $inner_component_package ); - } } =head1 PSGI Helpers