From: gfx Date: Wed, 30 Sep 2009 13:00:37 +0000 (+0900) Subject: A tiny tweak X-Git-Tag: 0.37_01~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=25f83ae1ee4aeed4ada879ffbd31a25b269efda8;p=gitmo%2FMouse.git A tiny tweak --- diff --git a/lib/Mouse/Meta/Class.pm b/lib/Mouse/Meta/Class.pm index 6abc7b2..134189d 100644 --- a/lib/Mouse/Meta/Class.pm +++ b/lib/Mouse/Meta/Class.pm @@ -409,7 +409,7 @@ sub does_role { || $self->throw_error("You must supply a role name to look for"); for my $class ($self->linearized_isa) { - my $meta = Mouse::Meta::Module::class_of($class); + my $meta = Mouse::Meta::Module::get_metaclass_by_name($class); next unless $meta && $meta->can('roles'); for my $role (@{ $meta->roles }) { diff --git a/lib/Mouse/Util/TypeConstraints.pm b/lib/Mouse/Util/TypeConstraints.pm index ce292dd..61205a0 100644 --- a/lib/Mouse/Util/TypeConstraints.pm +++ b/lib/Mouse/Util/TypeConstraints.pm @@ -8,7 +8,7 @@ use Carp qw(confess); use Scalar::Util qw/blessed looks_like_number openhandle/; use Mouse::Util qw(does_role not_supported); -use Mouse::Meta::Module; # class_of +use Mouse::Meta::Module; # get_metaclass_by_name() use Mouse::Meta::TypeConstraint; our @ISA = qw(Exporter); @@ -221,7 +221,7 @@ sub _find_or_create_regular_type{ return $TYPE{$spec} if exists $TYPE{$spec}; - my $meta = Mouse::Meta::Module::class_of($spec); + my $meta = Mouse::Meta::Module::get_metaclass_by_name($spec); if(!$meta){ return;