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=a06f189cb1c990aeaaf798da8094080a31abb1d3;hb=506fb74dbff3e8f756230c643d8bff7b85ae9ca3;hpb=065f79e7cd03765f26c6ea276aaf9b3c5897886a diff --git a/lib/Mouse/Meta/Method/Delegation.pm b/lib/Mouse/Meta/Method/Delegation.pm index a06f189..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_02 +This document describes Mouse version 0.40_09 =head1 SEE ALSO