From: Henry Van Styn Date: Sat, 8 Mar 2014 00:06:09 +0000 (-0500) Subject: Moved order of plugin setup back to pre 5.90052 location X-Git-Tag: 5.90061~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=b677b4c22739a063c230215b59c37a8e4e3e9a0e Moved order of plugin setup back to pre 5.90052 location In 17176f15aa (v5.90052) the plugin setup block was moved up to be called immediately after setup_plugins(), however, this causes issues with initialization order of other plugins that hook into setup(). This commit moves the block back down to just before setup_components, where it used to be. --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm old mode 100644 new mode 100755 index 8173fb0..6d77f40 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -1133,14 +1133,6 @@ sub setup { $class->setup_log( delete $flags->{log} ); $class->setup_plugins( delete $flags->{plugins} ); - # 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; - } - $class->setup_middleware(); $class->setup_data_handlers(); $class->setup_dispatcher( delete $flags->{dispatcher} ); @@ -1174,6 +1166,14 @@ 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( {} );