File Coverage

blib/lib/Moose/Meta/Method/Accessor/Native/Hash/clear.pm
Criterion Covered Total %
statement 20 21 95.2
branch n/a
condition n/a
subroutine 10 11 90.9
pod n/a
total 30 32 93.7


line stmt bran cond sub pod time code
1             package Moose::Meta::Method::Accessor::Native::Hash::clear;
2             our $VERSION = '2.2203';
3              
4 4     4   2381 use strict;
  4         14  
  4         132  
5 4     4   26 use warnings;
  4         10  
  4         104  
6              
7 4     4   20 use Moose::Role;
  4         10  
  4         30  
8              
9             with 'Moose::Meta::Method::Accessor::Native::Hash::Writer';
10              
11 12     12   43 sub _maximum_arguments { 0 }
12              
13 0     0   0 sub _adds_members { 0 }
14              
15             # The inner () in this expression is for the benefit of inlining code that
16             # might end up looking like "values %{ {} }". This is a syntax error in perl
17             # but 'values %{ { () } }' is not.
18 12     12   41 sub _potential_value { '{ ( ) }' }
19              
20             # There are no new members so we don't need to coerce new values (none exist)
21             # and we always want to check the new (empty) hash as a whole.
22 12     12   56 sub _inline_coerce_new_values { '' }
23              
24 9     9   32 sub _check_new_members_only { 0 }
25              
26             sub _inline_optimized_set_new_value {
27 7     7   19 my $self = shift;
28 7         21 my ($inv, $new, $slot_access) = @_;
29              
30 7         42 return $slot_access . ' = {};';
31             }
32              
33 24     24   98 sub _return_value { '' }
34              
35 4     4   33 no Moose::Role;
  4         19  
  4         23  
36              
37             1;