Commit | Line | Data |
---|---|---|
44babf1f | 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 | ||
8b9641b8 | 8 | use Moose::Role; |
44babf1f | 9 | |
00bbc132 | 10 | with 'Moose::Meta::Method::Accessor::Native::Reader'; |
44babf1f | 11 | |
12 | sub _maximum_arguments { 0 } | |
13 | ||
14 | sub _return_value { | |
53a4677c | 15 | my $self = shift; |
16 | my ($slot_access) = @_; | |
44babf1f | 17 | |
53a4677c | 18 | return 'map { $_, ' . $slot_access . '->{$_} } ' |
19 | . 'keys %{ (' . $slot_access . ') }'; | |
44babf1f | 20 | } |
21 | ||
8b9641b8 | 22 | no Moose::Role; |
44babf1f | 23 | |
24 | 1; |