Branch Coverage

blib/lib/JSON/Patch.pm
Criterion Covered Total %
branch 23 34 67.6


line true false branch
81 1 0 if (exists ${$hunk;}->{'A'}) { }
0 0 elsif (exists ${$hunk;}->{'N'}) { }
0 0 elsif (exists ${$hunk;}->{'R'}) { }
107 1 9 unless defined $hunk->{'op'}
108 1 8 unless exists $hunk->{'path'}
110 1 7 unless my $path = eval { do { str2path($hunk->{'path'}) } }
113 2 5 if ($hunk->{'op'} eq 'add' or $hunk->{'op'} eq 'replace') { }
1 4 elsif ($hunk->{'op'} eq 'remove') { }
2 2 elsif ($hunk->{'op'} eq 'move' or $hunk->{'op'} eq 'copy') { }
1 1 elsif ($hunk->{'op'} eq 'test') { }
114 1 1 unless exists $hunk->{'value'}
125 1 0 unless eval { do { &path($_[0], $path, 'delete', 1) } }
129 1 1 unless my $from = eval { do { str2path($hunk->{'from'}) } }
137 1 0 unless @found
142 0 1 unless exists $hunk->{'value'}
143 1 0 unless my(@found) = &path($_[0], $path, 'deref', 1)
146 0 0 if keys %{$diff;}