stop using excludes within moose, since it's no longer necessary
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Hash / exists.pm
1 package Moose::Meta::Method::Accessor::Native::Hash::exists;
2
3 use strict;
4 use warnings;
5
6 use Scalar::Util qw( looks_like_number );
7
8 use Moose::Role;
9
10 with 'Moose::Meta::Method::Accessor::Native::Reader',
11      'Moose::Meta::Method::Accessor::Native::Hash';
12
13 sub _minimum_arguments { 1 }
14
15 sub _maximum_arguments { 1 }
16
17 sub _inline_check_arguments {
18     my $self = shift;
19
20     return $self->_inline_check_var_is_valid_key('$_[0]');
21 }
22
23 sub _return_value {
24     my $self = shift;
25     my ($slot_access) = shift;
26
27     return 'exists ' . $slot_access . '->{ $_[0] }';
28 }
29
30 no Moose::Role;
31
32 1;