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