bump version to 0.89
[gitmo/Class-MOP.git] / lib / Class / MOP / Method.pm
index 60ad1f3..ea580ab 100644 (file)
@@ -5,9 +5,9 @@ use strict;
 use warnings;
 
 use Carp         'confess';
-use Scalar::Util 'weaken';
+use Scalar::Util 'weaken', 'reftype';
 
-our $VERSION   = '0.86';
+our $VERSION   = '0.89';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -28,7 +28,7 @@ sub wrap {
     my %params = @args;
     my $code = $params{body};
 
-    ('CODE' eq ref($code))
+    (ref $code && 'CODE' eq reftype($code))
         || confess "You must supply a CODE reference to bless, not (" . ($code || 'undef') . ")";
 
     ($params{package_name} && $params{name})