From: Dave Rolsky Date: Mon, 14 Sep 2009 20:21:46 +0000 (-0500) Subject: Actually load blessed X-Git-Tag: 0.90~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c96311fe9257a76d10cb8b99a8f03e8281df34a2;p=gitmo%2FMoose.git Actually load blessed --- diff --git a/lib/Moose/Object.pm b/lib/Moose/Object.pm index 12ea2f0..2a7d29e 100644 --- a/lib/Moose/Object.pm +++ b/lib/Moose/Object.pm @@ -6,7 +6,7 @@ use warnings; use Devel::GlobalDestruction qw(in_global_destruction); use MRO::Compat; -use Scalar::Util; +use Scalar::Util qw( blessed ); use Try::Tiny; use if ( not our $__mx_is_compiled ), 'Moose::Meta::Class'; @@ -20,11 +20,11 @@ sub new { my $class = shift; Carp::cluck 'Calling new() on an instance is deprecated,' - . ' please use (blessed $obj)->new' if blessed $class; + . ' please use (blessed $obj)->new' if blessed($class); my $params = $class->BUILDARGS(@_); - my $real_class = Scalar::Util::blessed($class) || $class; + my $real_class = blessed($class) || $class; my $self = Class::MOP::Class->initialize($real_class)->new_object($params); $self->BUILDALL($params);