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.2205';
3              
4 4     4   2477 use strict;
  4         12  
  4         149  
5 4     4   27 use warnings;
  4         12  
  4         112  
6              
7 4     4   24 use Moose::Role;
  4         16  
  4         29  
8              
9             with 'Moose::Meta::Method::Accessor::Native::Hash::Writer';
10              
11 12     12   49 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   37 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   55 sub _inline_coerce_new_values { '' }
23              
24 9     9   39 sub _check_new_members_only { 0 }
25              
26             sub _inline_optimized_set_new_value {
27 7     7   19 my $self = shift;
28 7         23 my ($inv, $new, $slot_access) = @_;
29              
30 7         49 return $slot_access . ' = {};';
31             }
32              
33 24     24   134 sub _return_value { '' }
34              
35 4     4   36 no Moose::Role;
  4         12  
  4         25  
36              
37             1;