bump version to 0.87
[gitmo/Moose.git] / lib / Moose / Meta / Method / Delegation.pm
index 04cab20..870d362 100644 (file)
@@ -7,7 +7,7 @@ use warnings;
 use Carp         'confess';
 use Scalar::Util 'blessed', 'weaken';
 
-our $VERSION   = '0.85';
+our $VERSION   = '0.87';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -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(