From: Shawn M Moore Date: Mon, 22 Dec 2008 03:52:26 +0000 (+0000) Subject: class_type shouldn't load the class (Moose compat; no easy fix :/) X-Git-Tag: 0.19~84 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a5fc1e9ae701943f0fd4bd9ba81a9a6eab523d0b;p=gitmo%2FMouse.git class_type shouldn't load the class (Moose compat; no easy fix :/) --- diff --git a/Changes b/Changes index 85276c3..f469d80 100644 --- a/Changes +++ b/Changes @@ -9,6 +9,8 @@ Revision history for Mouse * Keep track of the source package of each type + * class_type shouldn't load the class (Moose compat; no easy fix :/) + 0.14 Sat Dec 20 16:53:05 2008 * POD fix diff --git a/lib/Mouse/Util/TypeConstraints.pm b/lib/Mouse/Util/TypeConstraints.pm index ec44eb1..09f5077 100644 --- a/lib/Mouse/Util/TypeConstraints.pm +++ b/lib/Mouse/Util/TypeConstraints.pm @@ -143,7 +143,6 @@ sub _class_type { my $pkg = caller(0); my($name, $conf) = @_; my $class = $conf->{class}; - Mouse::load_class($class); _subtype( $name => where => sub { $_->isa($class) } ); diff --git a/t/800_shikabased/005-class_type.t b/t/800_shikabased/005-class_type.t index 862b514..e58fde2 100644 --- a/t/800_shikabased/005-class_type.t +++ b/t/800_shikabased/005-class_type.t @@ -6,6 +6,8 @@ use Test::More tests => 4; use Mouse; use Mouse::Util::TypeConstraints; + require t::lib::ClassType_Foo; + class_type Headers => { class => 't::lib::ClassType_Foo' }; coerce 'Headers' => from 'HashRef' => via {