change role-to-role application to allow method shadowing
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Hash / elements.pm
CommitLineData
44babf1f 1package Moose::Meta::Method::Accessor::Native::Hash::elements;
2
3use strict;
4use warnings;
5
6use Scalar::Util qw( looks_like_number );
7
8b9641b8 8use Moose::Role;
44babf1f 9
8b9641b8 10with 'Moose::Meta::Method::Accessor::Native::Reader' =>
11 { -excludes => ['_maximum_arguments'] };
44babf1f 12
13sub _maximum_arguments { 0 }
14
15sub _return_value {
53a4677c 16 my $self = shift;
17 my ($slot_access) = @_;
44babf1f 18
53a4677c 19 return 'map { $_, ' . $slot_access . '->{$_} } '
20 . 'keys %{ (' . $slot_access . ') }';
44babf1f 21}
22
8b9641b8 23no Moose::Role;
44babf1f 24
251;