Make _register_plugin use ensure_class_loaded
Marcus Ramberg [Wed, 18 Jul 2007 11:56:51 +0000 (11:56 +0000)]
Changes
lib/Catalyst.pm

diff --git a/Changes b/Changes
index b5fa7fa..f215f49 100644 (file)
--- 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
index 7bf9f6a..a3f918b 100644 (file)
@@ -2158,9 +2158,7 @@ the plugin name does not begin with C<Catalyst::Plugin::>.
         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) {