From: Tomas Doran Date: Fri, 29 May 2009 00:12:52 +0000 (+0000) Subject: And trivial fix by not using up X-Git-Tag: 5.80005~17 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=f66edc15eb31d30fbbe720760db712c50288e953 And trivial fix by not using up --- diff --git a/Changes b/Changes index 7b9ffb6..c18f261 100644 --- a/Changes +++ b/Changes @@ -12,6 +12,9 @@ to make $c->engine->env work in all cases (kmx) - Also fix $c->engine->env in Catalyst::Test tests (kmx) - Tests for this (t0m) + - Fix Catalyst failing to start if any plugin changed $_ whilst + loading (t0m) + - Tests for this New features: - Add $c->req->remote_user to disambiguate from $c->req->user (dwc) diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index e877ac8..137e618 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -2505,8 +2505,10 @@ the plugin name does not begin with C. my @plugins = map { s/\A\+// ? $_ : "Catalyst::Plugin::$_" } @$plugins; - Class::MOP::load_class($_) for @plugins; - + for my $plugin (@plugins) { + Class::MOP::load_class($plugin); + } + for my $plugin ( reverse @plugins ) { my $meta = find_meta($plugin); next if $meta && $meta->isa('Moose::Meta::Role');