Branch Coverage

blib/lib/File/Signature.pm
Criterion Covered Total %
branch 35 52 67.3


line true false branch
20 0 0 unless @_
21 0 0 unless 0 == @_ % 2
26 0 0 if exists $CONFIG{$opt}
28 0 0 unless wantarray
40 2 25 if ($_[0]->error) { }
52 1 14 unless defined $string
53 1 13 unless length $string
59 3 10 if ($string =~ s/^${sep_regex}ERROR$sep_regex//) { }
61 1 2 unless @fields == @ERRFIELDS
65 1 9 unless @fields == @FIELDS
76 1 24 unless defined $pathname
77 1 23 unless length $pathname
79 14 9 unless ($CONFIG{'allow_relative_paths'} or 0 == index($pathname, '/'))
85 7 16 unless @stat
87 0 16 unless open my $fh, '<', $pathname
91 0 0 unless /hex/ and 'Digest::MD5'->new->addfile($fh)->hexdigest or /b64/ and 'Digest::MD5'->new->addfile($fh)->b64digest or /bin/ and 'Digest::MD5'->new->addfile($fh)->digest
143 68 16 unless exists $$self{'failure'}
144 3 13 if (wantarray) { }
149 13 0 if exists $$self{'errormsg'}
159 0 0 if exists $$self{'old_sig'} and $$self{'old_sig'}->error
170 1 20 if $self->error
172 0 20 unless grep $field, @FIELDS
182 0 2 if $self->error
194 2 7 if $self->error
197 6 1 unless wantarray
223 0 9 if ($newsig->error) { }