Add semi-colon in code that generates entire assignment, which makes snippets more...
[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
10bd99ec 6our $VERSION = '1.14';
f7fd22b6 7$VERSION = eval $VERSION;
8our $AUTHORITY = 'cpan:STEVAN';
9
10use base 'Moose::Meta::Method::Accessor::Native::Array::Writer';
11
a7821be5 12sub _adds_members { 1 }
f7fd22b6 13
a7821be5 14sub _potential_value {
15 my ( $self, $slot_access ) = @_;
f7fd22b6 16
e32b7489 17 return "[ \@{ $slot_access }, \@_ ]";
18}
19
20sub _inline_optimized_set_new_value {
21 my ( $self, $inv, $new, $slot_access ) = @_;
22
584540d9 23 return "push \@{ $slot_access }, \@_";
f7fd22b6 24}
25
261;