refactor constructor inlining to reuse attribute code
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Array / get.pm
index aebd4e2..c440270 100644 (file)
@@ -5,7 +5,7 @@ use warnings;
 
 use Class::MOP::MiniTrait;
 
-our $VERSION = '1.16';
+our $VERSION = '1.19';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -33,10 +33,10 @@ sub _inline_check_arguments {
 }
 
 sub _return_value {
-    my $self        = shift;
-    my $slot_access = shift;
+    my $self = shift;
+    my ($slot_access) = @_;
 
-    return "${slot_access}->[ \$_[0] ]";
+    return $slot_access . '->[ $_[0] ]';
 }
 
 1;