Commit | Line | Data |
a7821be5 |
1 | package Moose::Meta::Method::Accessor::Native::Array::unshift; |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
6 | our $VERSION = '1.13'; |
7 | $VERSION = eval $VERSION; |
8 | our $AUTHORITY = 'cpan:STEVAN'; |
9 | |
10 | use base 'Moose::Meta::Method::Accessor::Native::Array::Writer'; |
11 | |
12 | sub _adds_members { 1 } |
13 | |
14 | sub _potential_value { |
15 | my ( $self, $slot_access ) = @_; |
16 | |
e32b7489 |
17 | return "[ \@_, \@{ $slot_access } ]"; |
18 | } |
19 | |
20 | sub _inline_optimized_set_new_value { |
21 | my ( $self, $inv, $new, $slot_access ) = @_; |
22 | |
23 | return "unshift \@{ $slot_access }, \@_;"; |
a7821be5 |
24 | } |
25 | |
26 | 1; |