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.2206';
3              
4 4     4   2502 use strict;
  4         13  
  4         140  
5 4     4   29 use warnings;
  4         11  
  4         109  
6              
7 4     4   26 use Moose::Role;
  4         12  
  4         88  
8              
9             with 'Moose::Meta::Method::Accessor::Native::Hash::Writer';
10              
11 12     12   55 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   38 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   67 sub _inline_coerce_new_values { '' }
23              
24 9     9   34 sub _check_new_members_only { 0 }
25              
26             sub _inline_optimized_set_new_value {
27 7     7   21 my $self = shift;
28 7         23 my ($inv, $new, $slot_access) = @_;
29              
30 7         48 return $slot_access . ' = {};';
31             }
32              
33 24     24   126 sub _return_value { '' }
34              
35 4     4   43 no Moose::Role;
  4         14  
  4         45  
36              
37             1;