From: Marcus Ramberg Date: Wed, 18 Jul 2007 11:56:51 +0000 (+0000) Subject: Make _register_plugin use ensure_class_loaded X-Git-Tag: 5.7099_04~181 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=893f05d23cfe569eabf9e2aa8568096f1270275a Make _register_plugin use ensure_class_loaded --- diff --git a/Changes b/Changes index b5fa7fa..f215f49 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,7 @@ This file documents the revision history for Perl extension Catalyst. - Fix bug where a nested component would be setup twice - Make ensure_class_loaded behave better with malformed class name + - Make _register_plugin use ensure_class_loaded 5.7008 - Fixed a bug where Content-Length could be set to 0 if a filehandle diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 7bf9f6a..a3f918b 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -2158,9 +2158,7 @@ the plugin name does not begin with C. my ( $proto, $plugin, $instant ) = @_; my $class = ref $proto || $proto; - unless (Class::Inspector->loaded($plugin)) { - require Class::Inspector->filename($plugin); - } + Catalyst::Utils::ensure_class_loaded( $plugin, { ignore_loaded => 1 } ); $proto->_plugins->{$plugin} = 1; unless ($instant) {