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=c805ed57b27d6d2dd61154f641376a3c4e8f23d7;hpb=efa728b4984ddf1611bc9931fbc209438459652c;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 c805ed5..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.15'; -$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;