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