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