Bump version to 1.9900 for new version numbering scheme
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Array / push.pm
1 package Moose::Meta::Method::Accessor::Native::Array::push;
2
3 use strict;
4 use warnings;
5
6 our $VERSION = '1.9900';
7 $VERSION = eval $VERSION;
8 our $AUTHORITY = 'cpan:STEVAN';
9
10 use Moose::Role;
11
12 with 'Moose::Meta::Method::Accessor::Native::Array::Writer' => {
13     -excludes => [
14         qw(
15             _inline_optimized_set_new_value
16             _return_value
17             )
18     ]
19 };
20
21 sub _adds_members { 1 }
22
23 sub _potential_value {
24     my $self = shift;
25     my ($slot_access) = @_;
26
27     return '[ @{ (' . $slot_access . ') }, @_ ]';
28 }
29
30 sub _inline_optimized_set_new_value {
31     my $self = shift;
32     my ($inv, $new, $slot_access) = @_;
33
34     return 'push @{ (' . $slot_access . ') }, @_;';
35 }
36
37 sub _return_value {
38     my $self = shift;
39     my ($slot_access) = @_;
40
41     return 'scalar @{ (' . $slot_access . ') }';
42 }
43
44 no Moose::Role;
45
46 1;