Commit | Line | Data |
---|---|---|
f7fd22b6 | 1 | package Moose::Meta::Method::Accessor::Native::Array::push; |
2 | ||
3 | use strict; | |
4 | use warnings; | |
5 | ||
efa728b4 | 6 | our $VERSION = '1.15'; |
f7fd22b6 | 7 | $VERSION = eval $VERSION; |
8 | our $AUTHORITY = 'cpan:STEVAN'; | |
9 | ||
8b9641b8 | 10 | use Moose::Role; |
11 | ||
12 | with 'Moose::Meta::Method::Accessor::Native::Array::Writer' => | |
13 | { -excludes => ['_inline_optimized_set_new_value'] }; | |
f7fd22b6 | 14 | |
a7821be5 | 15 | sub _adds_members { 1 } |
f7fd22b6 | 16 | |
a7821be5 | 17 | sub _potential_value { |
18 | my ( $self, $slot_access ) = @_; | |
f7fd22b6 | 19 | |
e32b7489 | 20 | return "[ \@{ $slot_access }, \@_ ]"; |
21 | } | |
22 | ||
23 | sub _inline_optimized_set_new_value { | |
24 | my ( $self, $inv, $new, $slot_access ) = @_; | |
25 | ||
584540d9 | 26 | return "push \@{ $slot_access }, \@_"; |
f7fd22b6 | 27 | } |
28 | ||
8b9641b8 | 29 | no Moose::Role; |
30 | ||
f7fd22b6 | 31 | 1; |