From: Florian Ragwitz Date: Mon, 29 Mar 2010 16:19:15 +0000 (+0000) Subject: We always have a metaclass after setup, right? X-Git-Tag: 5.80023~26 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=3f7d86f8303cd1d3f1d4ffa04bba510fc3a93d98 We always have a metaclass after setup, right? --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 8949d17..13c813a 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -2787,13 +2787,8 @@ the plugin name does not begin with C. if $plugin->isa( 'Catalyst::Component' ); $proto->_plugins->{$plugin} = 1; unless ($instant) { - no strict 'refs'; - if ( my $meta = Class::MOP::get_metaclass_by_name($class) ) { - my @superclasses = ($plugin, $meta->superclasses ); - $meta->superclasses(@superclasses); - } else { - unshift @{"$class\::ISA"}, $plugin; - } + my $meta = Class::MOP::get_metaclass_by_name($class); + $meta->superclasses($plugin, $meta->superclasses); } return $class; }