Beginning of dzilization
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Number / mod.pm
1 package Moose::Meta::Method::Accessor::Native::Number::mod;
2
3 use strict;
4 use warnings;
5
6 our $AUTHORITY = 'cpan:STEVAN';
7
8 use Moose::Role;
9
10 with 'Moose::Meta::Method::Accessor::Native::Writer' => {
11     -excludes => [
12         qw(
13             _minimum_arguments
14             _maximum_arguments
15             _inline_optimized_set_new_value
16             )
17     ]
18     };
19
20 sub _minimum_arguments { 1 }
21
22 sub _maximum_arguments { 1 }
23
24 sub _potential_value {
25     my $self = shift;
26     my ($slot_access) = @_;
27
28     return $slot_access . ' % $_[0]';
29 }
30
31 sub _inline_optimized_set_new_value {
32     my $self = shift;
33     my ($inv, $new, $slot_access) = @_;
34
35     return $slot_access . ' %= $_[0];';
36 }
37
38 no Moose::Role;
39
40 1;