Use dzil Authority plugin - remove $AUTHORITY from code
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Array / push.pm
CommitLineData
f7fd22b6 1package Moose::Meta::Method::Accessor::Native::Array::push;
2
3use strict;
4use warnings;
5
8b9641b8 6use Moose::Role;
7
7f5ec80d 8with 'Moose::Meta::Method::Accessor::Native::Array::Writer' => {
9 -excludes => [
10 qw(
a486d5ad 11 _inline_optimized_set_new_value
7f5ec80d 12 _return_value
13 )
14 ]
15};
f7fd22b6 16
a7821be5 17sub _adds_members { 1 }
f7fd22b6 18
a7821be5 19sub _potential_value {
53a4677c 20 my $self = shift;
21 my ($slot_access) = @_;
f7fd22b6 22
53a4677c 23 return '[ @{ (' . $slot_access . ') }, @_ ]';
e32b7489 24}
25
a486d5ad 26sub _inline_optimized_set_new_value {
53a4677c 27 my $self = shift;
28 my ($inv, $new, $slot_access) = @_;
e32b7489 29
a486d5ad 30 return 'push @{ (' . $slot_access . ') }, @_;';
f7fd22b6 31}
32
7f5ec80d 33sub _return_value {
53a4677c 34 my $self = shift;
35 my ($slot_access) = @_;
7f5ec80d 36
53a4677c 37 return 'scalar @{ (' . $slot_access . ') }';
7f5ec80d 38}
39
8b9641b8 40no Moose::Role;
41
f7fd22b6 421;