X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FMethod%2FDelegation.pm;h=88ea1fa14e0982fc410121902ba8b96d4d9490dd;hb=2cc6f9825ee943b379068b9e9d4938bbc84e0308;hp=1118b1e1d4258b40417df0447b3c60caf151c093;hpb=9e7d12e13e77caff4851a5dd93b14304f1c7aa57;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Method/Delegation.pm b/lib/Moose/Meta/Method/Delegation.pm index 1118b1e..88ea1fa 100644 --- a/lib/Moose/Meta/Method/Delegation.pm +++ b/lib/Moose/Meta/Method/Delegation.pm @@ -81,9 +81,9 @@ sub _initialize_body { my $proxy = $instance->$accessor(); my $error - = !defined $proxy ? ' is not defined' - : !blessed $proxy ? qq{ is not an object (got '$proxy')} - : undef; + = !defined $proxy ? ' is not defined' + : ref($proxy) && !blessed($proxy) ? qq{ is not an object (got '$proxy')} + : undef; if ($error) { $self->throw_error(