Commit | Line | Data |
910684ee |
1 | package Moose::Meta::Method::Accessor::Native::Array::get; |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
6 | our $VERSION = '1.13'; |
7 | $VERSION = eval $VERSION; |
8 | our $AUTHORITY = 'cpan:STEVAN'; |
9 | |
126a13c8 |
10 | use base qw( |
11 | Moose::Meta::Method::Accessor::Native::Array |
12 | Moose::Meta::Method::Accessor::Native::Reader |
13 | ); |
910684ee |
14 | |
a7821be5 |
15 | sub _minimum_arguments { 1 } |
16 | |
17 | sub _maximum_arguments { 1 } |
910684ee |
18 | |
19 | sub _inline_check_arguments { |
a7821be5 |
20 | my $self = shift; |
21 | |
22 | return $self->_inline_check_var_is_valid_index('$_[0]'); |
910684ee |
23 | } |
24 | |
25 | sub _return_value { |
26 | my $self = shift; |
27 | my $slot_access = shift; |
28 | |
a7821be5 |
29 | return "${slot_access}->[ \$_[0] ]"; |
910684ee |
30 | } |
31 | |
32 | 1; |