Commit | Line | Data |
---|---|---|
f23ffd15 | 1 | package Moose::Meta::Method::Accessor::Native::Number::div; |
2 | ||
3 | use strict; | |
4 | use warnings; | |
5 | ||
8b9641b8 | 6 | use Moose::Role; |
7 | ||
8 | with 'Moose::Meta::Method::Accessor::Native::Writer' => { | |
9 | -excludes => [ | |
10 | qw( | |
11 | _minimum_arguments | |
12 | _maximum_arguments | |
a486d5ad | 13 | _inline_optimized_set_new_value |
8b9641b8 | 14 | ) |
15 | ] | |
7f5ec80d | 16 | }; |
f23ffd15 | 17 | |
1e2c801e | 18 | sub _minimum_arguments { 1 } |
8b9641b8 | 19 | |
1e2c801e | 20 | sub _maximum_arguments { 1 } |
f23ffd15 | 21 | |
22 | sub _potential_value { | |
53a4677c | 23 | my $self = shift; |
24 | my ($slot_access) = @_; | |
f23ffd15 | 25 | |
53a4677c | 26 | return $slot_access . ' / $_[0]'; |
f23ffd15 | 27 | } |
28 | ||
a486d5ad | 29 | sub _inline_optimized_set_new_value { |
53a4677c | 30 | my $self = shift; |
31 | my ($inv, $new, $slot_access) = @_; | |
f23ffd15 | 32 | |
a486d5ad | 33 | return $slot_access . ' /= $_[0];'; |
f23ffd15 | 34 | } |
35 | ||
8b9641b8 | 36 | no Moose::Role; |
37 | ||
f23ffd15 | 38 | 1; |