X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FMethod%2FAccessor%2FNative%2FHash%2Fis_empty.pm;h=9141cab9026ebbfbe74bb282eefcbd2c49a7bf2d;hb=00bbc132f9e1cb2b1a44aa287887cafa27a84577;hp=b6a3fc6aabc00b0530ec4c02ef201336ddb078f3;hpb=8b9641b857cdd065a68f9b74ad072b1d58fcd4e1;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Method/Accessor/Native/Hash/is_empty.pm b/lib/Moose/Meta/Method/Accessor/Native/Hash/is_empty.pm index b6a3fc6..9141cab 100644 --- a/lib/Moose/Meta/Method/Accessor/Native/Hash/is_empty.pm +++ b/lib/Moose/Meta/Method/Accessor/Native/Hash/is_empty.pm @@ -5,22 +5,17 @@ use warnings; use Scalar::Util qw( looks_like_number ); -our $VERSION = '1.14'; -$VERSION = eval $VERSION; -our $AUTHORITY = 'cpan:STEVAN'; - use Moose::Role; -with 'Moose::Meta::Method::Accessor::Native::Reader' => - { -excludes => ['_maximum_arguments'] }; +with 'Moose::Meta::Method::Accessor::Native::Reader'; sub _maximum_arguments { 0 } sub _return_value { - my $self = shift; - my $slot_access = shift; + my $self = shift; + my ($slot_access) = @_; - return "scalar keys \%{ $slot_access } ? 0 : 1"; + return 'scalar keys %{ (' . $slot_access . ') } ? 0 : 1'; } no Moose::Role;