X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FMethod%2FAccessor%2FNative%2FString%2Finc.pm;h=c19bf6c5ca2bbcab93c334264bd98b65f4ce5663;hb=0c3879e855fa83153b432144307fb0e8b7e8d595;hp=162257187fbfe4b66fcabb482601f2370dc90221;hpb=10bd99ecf3f1706d4452fa57e3f08a63b9f92a11;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Method/Accessor/Native/String/inc.pm b/lib/Moose/Meta/Method/Accessor/Native/String/inc.pm index 1622571..c19bf6c 100644 --- a/lib/Moose/Meta/Method/Accessor/Native/String/inc.pm +++ b/lib/Moose/Meta/Method/Accessor/Native/String/inc.pm @@ -3,25 +3,35 @@ package Moose::Meta::Method::Accessor::Native::String::inc; use strict; use warnings; -our $VERSION = '1.14'; +our $VERSION = '1.25'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; -use base 'Moose::Meta::Method::Accessor::Native::Writer'; +use Moose::Role; + +with 'Moose::Meta::Method::Accessor::Native::Writer' => { + -excludes => [ + qw( + _maximum_arguments + _inline_optimized_set_new_value + ) + ] + }; -sub _minimum_arguments { 0 } sub _maximum_arguments { 0 } sub _potential_value { my ( $self, $slot_access ) = @_; - return "( do { my \$val = $slot_access; \$val++ } )"; + return "( do { my \$val = $slot_access; \$val++; \$val } )"; } sub _inline_optimized_set_new_value { my ( $self, $inv, $new, $slot_access ) = @_; - return "${slot_access}++;"; + return "${slot_access}++"; } +no Moose::Role; + 1;