1 package Moose::Meta::Method::Accessor::Native::Counter::dec;
8 with 'Moose::Meta::Method::Accessor::Native::Writer';
10 sub _minimum_arguments { 0 }
11 sub _maximum_arguments { 1 }
13 sub _potential_value {
15 my ($slot_access) = @_;
17 return $slot_access . ' - (defined $_[0] ? $_[0] : 1)';
20 sub _inline_optimized_set_new_value {
22 my ($inv, $new, $slot_access) = @_;
24 return $slot_access . ' -= defined $_[0] ? $_[0] : 1;';