if we aren't calling _inline_return_value, none of this is necessary
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Hash / count.pm
index aac1627..c4927e0 100644 (file)
@@ -5,10 +5,6 @@ use warnings;
 
 use Scalar::Util qw( looks_like_number );
 
-our $VERSION = '1.18';
-$VERSION = eval $VERSION;
-our $AUTHORITY = 'cpan:STEVAN';
-
 use Moose::Role;
 
 with 'Moose::Meta::Method::Accessor::Native::Reader' =>
@@ -17,10 +13,10 @@ 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) }";
+    return 'scalar keys %{ (' . $slot_access . ') }';
 }
 
 no Moose::Role;