From: Shawn M Moore Date: Tue, 10 Jun 2008 01:21:38 +0000 (+0000) Subject: Use Scalar::Util/Carp imports for brevity X-Git-Tag: 0.04~81 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b17094cee3a42ff2669ee90b8393542de142633d;p=gitmo%2FMouse.git Use Scalar::Util/Carp imports for brevity --- diff --git a/lib/Mouse.pm b/lib/Mouse.pm index fce4bd8..37f92ca 100644 --- a/lib/Mouse.pm +++ b/lib/Mouse.pm @@ -43,11 +43,11 @@ do { }, confess => sub { - return \&Carp::confess; + return \&confess; }, blessed => sub { - return \&Scalar::Util::blessed; + return \&blessed; }, ); diff --git a/lib/Mouse/Object.pm b/lib/Mouse/Object.pm index 27f914b..dcb8590 100644 --- a/lib/Mouse/Object.pm +++ b/lib/Mouse/Object.pm @@ -4,7 +4,7 @@ use strict; use warnings; use MRO::Compat; -use Scalar::Util 'blessed'; +use Scalar::Util qw/blessed weaken/; use Carp 'confess'; sub new { @@ -33,7 +33,7 @@ sub new { $instance->{$key} = $value; - Scalar::Util::weaken($instance->{$key}) + weaken($instance->{$key}) if $attribute->weak_ref; } } @@ -50,7 +50,7 @@ sub new { $instance->{$key} = $args{$key}; - Scalar::Util::weaken($instance->{$key}) + weaken($instance->{$key}) if $attribute->weak_ref; if ($attribute->has_trigger) {