X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FMethod%2FDelegation.pm;h=e100c94fd44e9042e3ce5908927735aad662bdef;hp=d4d28dce99a948a217d43e8ab50b85cacdde1e04;hb=506fb74dbff3e8f756230c643d8bff7b85ae9ca3;hpb=2b68f76d78d96325821e9a6360c3639f8c5637df diff --git a/lib/Mouse/Meta/Method/Delegation.pm b/lib/Mouse/Meta/Method/Delegation.pm index d4d28dc..e100c94 100644 --- a/lib/Mouse/Meta/Method/Delegation.pm +++ b/lib/Mouse/Meta/Method/Delegation.pm @@ -1,6 +1,6 @@ package Mouse::Meta::Method::Delegation; -use Mouse::Util; # enables strict and warnings -use Scalar::Util qw(blessed); +use Mouse::Util qw(:meta); # enables strict and warnings +use Scalar::Util; sub _generate_delegation{ my (undef, $attribute, $metaclass, $reader, $handle_name, $method_to_call) = @_; @@ -9,9 +9,9 @@ sub _generate_delegation{ my $instance = shift; my $proxy = $instance->$reader(); - my $error = !defined($proxy) ? ' is not defined' - : ref($proxy) && !blessed($proxy) ? qq{ is not an object (got '$proxy')} - : undef; + my $error = !defined($proxy) ? ' is not defined' + : ref($proxy) && !Scalar::Util::blessed($proxy) ? qq{ is not an object (got '$proxy')} + : undef; if ($error) { $instance->meta->throw_error( "Cannot delegate $handle_name to $method_to_call because " @@ -34,7 +34,7 @@ Mouse::Meta::Method::Delegation - A Mouse method generator for delegation method =head1 VERSION -This document describes Mouse version 0.40_03 +This document describes Mouse version 0.40_09 =head1 SEE ALSO