[Catalyst-commits] r8550 - in Catalyst-Runtime/5.80/trunk: . lib
lib/Catalyst t
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Fri Oct 17 05:07:35 BST 2008
Author: rafl
Date: 2008-10-17 05:07:35 +0100 (Fri, 17 Oct 2008)
New Revision: 8550
Modified:
Catalyst-Runtime/5.80/trunk/Makefile.PL
Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
Catalyst-Runtime/5.80/trunk/lib/Catalyst/Controller.pm
Catalyst-Runtime/5.80/trunk/lib/Catalyst/Utils.pm
Catalyst-Runtime/5.80/trunk/t/unit_utils_load_class.t
Log:
Stop using Class::Inspector. Class::MOP::load_class does all we need.
Modified: Catalyst-Runtime/5.80/trunk/Makefile.PL
===================================================================
--- Catalyst-Runtime/5.80/trunk/Makefile.PL 2008-10-17 04:07:27 UTC (rev 8549)
+++ Catalyst-Runtime/5.80/trunk/Makefile.PL 2008-10-17 04:07:35 UTC (rev 8550)
@@ -8,7 +8,7 @@
requires 'MooseX::Emulate::Class::Accessor::Fast' => '0.00300';
requires 'Moose' => '0.59';
requires 'Carp';
-requires 'Class::Inspector' => '1.06';
+requires 'Class::MOP';
requires 'CGI::Simple::Cookie';
requires 'Data::Dump';
requires 'File::Modified';
@@ -32,6 +32,7 @@
requires 'MRO::Compat';
test_requires 'NEXT';
+test_requires 'Class::Inspector';
test_requires 'Class::Data::Inheritable';
if ( ( exists $ENV{AGGREGATE_TESTS} && !$ENV{AGGREGATE_TESTS})
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Controller.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Controller.pm 2008-10-17 04:07:27 UTC (rev 8549)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Controller.pm 2008-10-17 04:07:35 UTC (rev 8550)
@@ -7,7 +7,6 @@
use Scalar::Util qw/blessed/;
use Catalyst::Exception;
use Catalyst::Utils;
-use Class::Inspector;
has path_prefix =>
(
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/Utils.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/Utils.pm 2008-10-17 04:07:27 UTC (rev 8549)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/Utils.pm 2008-10-17 04:07:35 UTC (rev 8550)
@@ -6,7 +6,6 @@
use HTTP::Request;
use Path::Class;
use URI;
-use Class::Inspector;
use Carp qw/croak/;
use Cwd;
@@ -261,8 +260,10 @@
if $class =~ m/\.pm$/;
return if !$opts->{ ignore_loaded }
- && Class::Inspector->loaded( $class ); # if a symbol entry exists we don't load again
+ && Class::MOP::is_class_loaded($class); # if a symbol entry exists we don't load again
+ # as soon as Class::MOP 0.67 + 1 is released Class::MOP::load_class($class) can be used instead
+
# this hack is so we don't overwrite $@ if the load did not generate an error
my $error;
{
@@ -274,8 +275,9 @@
}
die $error if $error;
+
die "require $class was successful but the package is not defined"
- unless Class::Inspector->loaded($class);
+ unless Class::MOP::is_class_loaded($class);
return 1;
}
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2008-10-17 04:07:27 UTC (rev 8549)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2008-10-17 04:07:35 UTC (rev 8550)
@@ -2138,9 +2138,6 @@
}
Class::MOP::load_class($engine);
- #unless (Class::Inspector->loaded($engine)) {
- # require Class::Inspector->filename($engine);
- #}
# check for old engines that are no longer compatible
my $old_engine;
Modified: Catalyst-Runtime/5.80/trunk/t/unit_utils_load_class.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/unit_utils_load_class.t 2008-10-17 04:07:27 UTC (rev 8549)
+++ Catalyst-Runtime/5.80/trunk/t/unit_utils_load_class.t 2008-10-17 04:07:35 UTC (rev 8550)
@@ -4,6 +4,7 @@
use warnings;
use Test::More tests => 16;
+use Class::Inspector;
use lib "t/lib";
More information about the Catalyst-commits
mailing list