Beginning of dzilization
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / String / substr.pm
index 40195e8..25b3ac7 100644 (file)
@@ -5,8 +5,6 @@ use warnings;
 
 use Moose::Util ();
 
-our $VERSION = '1.19';
-$VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
 use Moose::Role;
@@ -30,7 +28,7 @@ with 'Moose::Meta::Method::Accessor::Native::Reader' => {
             _maximum_arguments
             _inline_process_arguments
             _inline_check_arguments
-            _optimized_set_new_value
+            _inline_optimized_set_new_value
             _return_value
             )
     ]
@@ -44,7 +42,6 @@ sub _generate_method {
 
     return (
         'sub {',
-            $self->_inline_pre_body(@_),
             'my ' . $inv . ' = shift;',
             $self->_inline_curried_arguments,
             'if (@_ == 1 || @_ == 2) {',
@@ -52,7 +49,6 @@ sub _generate_method {
             '}',
             'elsif (@_ == 3) {',
                 $self->_inline_writer_core($inv, $slot_access),
-                $self->_inline_post_body(@_),
             '}',
             'else {',
                 $self->_inline_check_argument_count,
@@ -116,12 +112,12 @@ sub _potential_value {
          . '})';
 }
 
-sub _optimized_set_new_value {
+sub _inline_optimized_set_new_value {
     my $self = shift;
     my ($inv, $new, $slot_access) = @_;
 
     return '@return = substr ' . $slot_access . ', '
-                           . '$offset, $length, $replacement';
+                           . '$offset, $length, $replacement;';
 }
 
 sub _return_value {