From: Alexander Hartmaier Date: Mon, 16 Dec 2013 15:56:23 +0000 (+0100) Subject: fixed first block of startup debug messages missing when using a custom logger that... X-Git-Tag: 5.90052~13 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=02352a283d954f8837277e40ba141b5c2c07af1b;hp=fc89737e02828d5d94c5271c74fb173ad29b28ca fixed first block of startup debug messages missing when using a custom logger that gets set at runtime for example by overriding finalize_config --- diff --git a/Changes b/Changes index 711fa30..4220eeb 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ # This file documents the revision history for Perl extension Catalyst. + - Fixed first block of startup debug messages missing when using a custom + logger that gets set at runtime, for example by overriding finalize_config + 5.90051 - 2013-11-06 - Be more skeptical of the existance of $request->env to fix a regression introduced in Catalyst::Action::REST by the previous release diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 310eafe..5002763 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -1159,6 +1159,19 @@ You are running an old script! EOF } + # Call plugins setup, this is stupid and evil. + # Also screws C3 badly on 5.10, hack to avoid. + { + no warnings qw/redefine/; + local *setup = sub { }; + $class->setup unless $Catalyst::__AM_RESTARTING; + } + + # Initialize our data structure + $class->components( {} ); + + $class->setup_components; + if ( $class->debug ) { my @plugins = map { "$_ " . ( $_->VERSION || '' ) } $class->registered_plugins; @@ -1202,22 +1215,7 @@ EOF ? $class->log->debug(qq/Found home "$home"/) : $class->log->debug(qq/Home "$home" doesn't exist/) : $class->log->debug(q/Couldn't find home/); - } - # Call plugins setup, this is stupid and evil. - # Also screws C3 badly on 5.10, hack to avoid. - { - no warnings qw/redefine/; - local *setup = sub { }; - $class->setup unless $Catalyst::__AM_RESTARTING; - } - - # Initialize our data structure - $class->components( {} ); - - $class->setup_components; - - if ( $class->debug ) { 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 } ) {