projects
/
gitmo/Moose.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Add explicit return values for (almost) all native delegation mutating methods
[gitmo/Moose.git]
/
lib
/
Moose
/
Meta
/
Method
/
Accessor
/
Native
/
Counter
/
reset.pm
diff --git
a/lib/Moose/Meta/Method/Accessor/Native/Counter/reset.pm
b/lib/Moose/Meta/Method/Accessor/Native/Counter/reset.pm
index
72e788e
..
843e65a
100644
(file)
--- a/
lib/Moose/Meta/Method/Accessor/Native/Counter/reset.pm
+++ b/
lib/Moose/Meta/Method/Accessor/Native/Counter/reset.pm
@@
-14,6
+14,7
@@
with 'Moose::Meta::Method::Accessor::Native::Writer' => {
qw(
_maximum_arguments
_inline_optimized_set_new_value
+ _return_value
)
]
};
@@
-32,6
+33,12
@@
sub _inline_optimized_set_new_value {
return "$slot_access = \$attr->default(\$self)";
}
+sub _return_value {
+ my ( $self, $slot_access ) = @_;
+
+ return "return $slot_access;";
+}
+
no Moose::Role;
1;