bump version to 1.25
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Hash / exists.pm
CommitLineData
44babf1f 1package Moose::Meta::Method::Accessor::Native::Hash::exists;
2
3use strict;
4use warnings;
5
6use Scalar::Util qw( looks_like_number );
7
0c3879e8 8our $VERSION = '1.25';
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 _maximum_arguments
19 _inline_check_arguments
20 )
21 ],
22 },
23 'Moose::Meta::Method::Accessor::Native::Hash';
44babf1f 24
25sub _minimum_arguments { 1 }
26
27sub _maximum_arguments { 1 }
28
29sub _inline_check_arguments {
30 my $self = shift;
31
32 return $self->_inline_check_var_is_valid_key('$_[0]');
33}
34
35sub _return_value {
36 my $self = shift;
37 my $slot_access = shift;
38
39 return "exists ${slot_access}->{ \$_[0] }";
40}
41
8b9641b8 42no Moose::Role;
44babf1f 43
441;