Beginning of dzilization
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Array / splice.pm
index caccb7f..2436766 100644 (file)
@@ -3,8 +3,6 @@ package Moose::Meta::Method::Accessor::Native::Array::splice;
 use strict;
 use warnings;
 
-our $VERSION = '1.19';
-$VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
 use Moose::Role;
@@ -15,7 +13,7 @@ with 'Moose::Meta::Method::Accessor::Native::Array::Writer' => {
             _minimum_arguments
             _inline_process_arguments
             _inline_check_arguments
-            _optimized_set_new_value
+            _inline_optimized_set_new_value
             _return_value
             )
     ]
@@ -58,13 +56,15 @@ sub _potential_value {
          . '})';
 }
 
-sub _optimized_set_new_value {
+sub _inline_optimized_set_new_value {
     my $self = shift;
     my ($inv, $new, $slot_access) = @_;
 
-    return '@return = defined $len '
-             . '? (splice @{ (' . $slot_access . ') }, $idx, $len, @_) '
-             . ': (splice @{ (' . $slot_access . ') }, $idx)';
+    return (
+        '@return = defined $len',
+            '? (splice @{ (' . $slot_access . ') }, $idx, $len, @_)',
+            ': (splice @{ (' . $slot_access . ') }, $idx);',
+    );
 }
 
 sub _return_value {