projects
/
gitmo/Moose.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Refactored native trait inlining some more - added an optimized path to avoid copying...
[gitmo/Moose.git]
/
lib
/
Moose
/
Meta
/
Method
/
Accessor
/
Native
/
Array
/
clear.pm
diff --git
a/lib/Moose/Meta/Method/Accessor/Native/Array/clear.pm
b/lib/Moose/Meta/Method/Accessor/Native/Array/clear.pm
index
c991ca5
..
c273d55
100644
(file)
--- a/
lib/Moose/Meta/Method/Accessor/Native/Array/clear.pm
+++ b/
lib/Moose/Meta/Method/Accessor/Native/Array/clear.pm
@@
-15,4
+15,10
@@
sub _adds_members { 0 }
sub _potential_value { return '()' }
+sub _inline_optimized_set_new_value {
+ my ( $self, $inv, $new, $slot_access ) = @_;
+
+ return "$slot_access = [];";
+}
+
1;