From: Fuji, Goro Date: Fri, 12 Nov 2010 00:55:25 +0000 (+0900) Subject: No duplicate check for role_type() X-Git-Tag: 0.86~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ef223decd6bf1150e5219d150911404a11df072d;p=gitmo%2FMouse.git No duplicate check for role_type() --- diff --git a/lib/Mouse/Util/TypeConstraints.pm b/lib/Mouse/Util/TypeConstraints.pm index 515bdba..bc32489 100644 --- a/lib/Mouse/Util/TypeConstraints.pm +++ b/lib/Mouse/Util/TypeConstraints.pm @@ -4,8 +4,7 @@ use Mouse::Util; # enables strict and warnings use Mouse::Meta::TypeConstraint; use Mouse::Exporter; -use Carp (); -use Scalar::Util (); +use Carp (); Mouse::Exporter->setup_import_methods( as_is => [qw( @@ -212,8 +211,7 @@ sub role_type { return subtype $name => ( as => 'Object', optimized_as => sub { - return Scalar::Util::blessed($_[0]) - && Mouse::Util::does_role($_[0], $role); + return Mouse::Util::does_role($_[0], $role); }, role => $role, );