Use dzil Authority plugin - remove $AUTHORITY from code
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Hash / is_empty.pm
1 package Moose::Meta::Method::Accessor::Native::Hash::is_empty;
2
3 use strict;
4 use warnings;
5
6 use Scalar::Util qw( looks_like_number );
7
8 use Moose::Role;
9
10 with 'Moose::Meta::Method::Accessor::Native::Reader' =>
11     { -excludes => ['_maximum_arguments'] };
12
13 sub _maximum_arguments { 0 }
14
15 sub _return_value {
16     my $self = shift;
17     my ($slot_access) = @_;
18
19     return 'scalar keys %{ (' . $slot_access . ') } ? 0 : 1';
20 }
21
22 no Moose::Role;
23
24 1;