Bump version to 1.9900 for new version numbering scheme
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Hash / get.pm
CommitLineData
44babf1f 1package Moose::Meta::Method::Accessor::Native::Hash::get;
2
3use strict;
4use warnings;
5
6use Scalar::Util qw( looks_like_number );
7
bb8ef151 8our $VERSION = '1.9900';
44babf1f 9$VERSION = eval $VERSION;
10our $AUTHORITY = 'cpan:STEVAN';
11
8b9641b8 12use Moose::Role;
13
14with 'Moose::Meta::Method::Accessor::Native::Reader' => {
15 -excludes => [
16 qw(
17 _minimum_arguments
18 _inline_check_arguments
19 )
20 ],
21 },
22 'Moose::Meta::Method::Accessor::Native::Hash';
44babf1f 23
24sub _minimum_arguments { 1 }
25
44babf1f 26sub _inline_check_arguments {
27 my $self = shift;
28
53a4677c 29 return (
30 'for (@_) {',
31 $self->_inline_check_var_is_valid_key('$_'),
32 '}',
33 );
44babf1f 34}
35
36sub _return_value {
53a4677c 37 my $self = shift;
38 my ($slot_access) = @_;
44babf1f 39
53a4677c 40 return '@_ > 1 '
41 . '? @{ (' . $slot_access . ') }{@_} '
42 . ': ' . $slot_access . '->{$_[0]}';
44babf1f 43}
44
8b9641b8 45no Moose::Role;
44babf1f 46
471;