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
CommitLineData
a7821be5 1package Moose::Meta::Method::Accessor::Native::Array::clear;
2
3use strict;
4use warnings;
5
6our $VERSION = '1.13';
7$VERSION = eval $VERSION;
8our $AUTHORITY = 'cpan:STEVAN';
9
10use base 'Moose::Meta::Method::Accessor::Native::Array::Writer';
11
12sub _maximum_arguments { 0 }
13
14sub _adds_members { 0 }
15
16sub _potential_value { return '()' }
17
e32b7489 18sub _inline_optimized_set_new_value {
19 my ( $self, $inv, $new, $slot_access ) = @_;
20
21 return "$slot_access = [];";
22}
23
a7821be5 241;