bump version to 0.89
[gitmo/Class-MOP.git] / lib / Class / MOP / Method.pm
index e6d93c8..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.82_02';
+our $VERSION   = '0.89';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -18,15 +18,6 @@ use base 'Class::MOP::Object';
 # they should act like CODE refs.
 use overload '&{}' => sub { $_[0]->body }, fallback => 1;
 
-our $UPGRADE_ERROR_TEXT = q{
----------------------------------------------------------
-NOTE: this error is likely not an error, but a regression
-caused by the latest upgrade to Moose/Class::MOP. Consider
-upgrading any MooseX::* modules to their latest versions
-before spending too much time chasing this one down.
----------------------------------------------------------
-};
-
 # construction
 
 sub wrap {
@@ -37,11 +28,11 @@ 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})
-        || confess "You must supply the package_name and name parameters $UPGRADE_ERROR_TEXT";
+        || confess "You must supply the package_name and name parameters";
 
     my $self = $class->_new(\%params);