a7beb3adf2b787e12a9ba67a72ce13492fbf8868
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Hash / elements.pm
1 package Moose::Meta::Method::Accessor::Native::Hash::elements;
2
3 use strict;
4 use warnings;
5
6 use Scalar::Util qw( looks_like_number );
7
8 our $VERSION = '1.19';
9 $VERSION = eval $VERSION;
10 our $AUTHORITY = 'cpan:STEVAN';
11
12 use Moose::Role;
13
14 with 'Moose::Meta::Method::Accessor::Native::Reader' =>
15     { -excludes => ['_maximum_arguments'] };
16
17 sub _maximum_arguments { 0 }
18
19 sub _return_value {
20     my $self = shift;
21     my ($slot_access) = @_;
22
23     return 'map { $_, ' . $slot_access . '->{$_} } '
24              . 'keys %{ (' . $slot_access . ') }';
25 }
26
27 no Moose::Role;
28
29 1;