Use dzil Authority plugin - remove $AUTHORITY from code
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Hash / is_empty.pm
CommitLineData
44babf1f 1package Moose::Meta::Method::Accessor::Native::Hash::is_empty;
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 'scalar keys %{ (' . $slot_access . ') } ? 0 : 1';
44babf1f 20}
21
8b9641b8 22no Moose::Role;
44babf1f 23
241;