Branch Coverage

blib/lib/Convert/Binary/C/Cached.pm
Criterion Covered Total %
branch 100 134 74.6


line true false branch
37 1 929 if @_ % 2
39 927 2 if @_
48 3 1954 if (@_ < 2 and not defined wantarray)
49 2 1 if $^W
53 952 1002 if (@_ == 0) { }
0 2004 elsif (@_ == 1 and $_[0] eq 'Cache') { }
64 0 1002 if (@_ == 1) { }
1002 0 elsif (@_ % 2 == 0) { }
70 922 315 if (exists $arg{'Cache'}) { }
71 0 922 if ($self->{'parsed'}) { }
1 921 elsif (ref $arg{'Cache'}) { }
78 921 0 if (defined $arg{'Cache'})
81 2 919 if $@
83 1 920 if $@
84 2 919 if (@missing)
85 2 0 if $^W
98 109 892 if (@args)
100 44 65 if $@
122 3 0 unless (defined wantarray)
123 2 1 if $^W
130 0 0 if ($_)
131 0 0 ref $_ eq 'ARRAY' ? :
143 6 32 if defined $error
144 12 20 if defined wantarray
152 57 918 if defined $error
153 15 903 if defined wantarray
160 3 17 unless $self->{'parsed'}
162 3 14 unless (defined wantarray)
163 2 1 if $^W
167 7 7 unless $self->{'files'}
180 919 96 if (defined $self->{'cache'})
181 1 918 if $self->{'parsed'}
185 35 883 if ($self->__can_use_cache)
191 18 17 unless ($@ or @WARN)
206 23 973 if ($_[0] eq 'file') { }
214 63 933 if ($@) { }
219 900 33 if defined $self->{'cache'}
232 5 913 unless (-e $self->{'cache'} and -s _)
233 0 5 if $ENV{'CBCC_DEBUG'}
237 0 913 unless ($fh->open($self->{'cache'}))
238 0 0 if $^W
239 0 0 if $ENV{'CBCC_DEBUG'}
246 0 913 unless (defined($config = readline $fh))
247 0 0 if $ENV{'CBCC_DEBUG'}
250 5 908 unless ($config =~ /^#if\s+0/)
251 0 5 if $ENV{'CBCC_DEBUG'}
262 0 41 if ($@ or @warnings or @config % 2)
263 0 867 if $ENV{'CBCC_DEBUG'}
269 23 18 exists $self->{'code'} ? :
271 2 38 unless (exists $config{$what} and $config{$what} eq $self->{$what} and __reccmp($config{'cfg'}, $self->configure))
274 0 3 if ($ENV{'CBCC_DEBUG'})
285 0 7702 unless (-e $file)
286 0 0 if $ENV{'CBCC_DEBUG'}
290 1 7699 unless ($spec->{'size'} == $size and $spec->{'mtime'} == $mtime and $spec->{'ctime'} == $ctime)
293 0 3 if $ENV{'CBCC_DEBUG'}
300 0 35 if $ENV{'CBCC_DEBUG'}
309 1 899 unless $fh->open(">$self->{'cache'}")
311 877 22 exists $self->{'code'} ? :
328 10 0 unless defined $ref or defined $val
329 0 2392 unless defined $ref and defined $val
331 2121 271 unless ref $ref
333 156 115 if (ref $ref eq 'ARRAY') { }
115 0 elsif (ref $ref eq 'HASH') { }
334 1 155 unless @$ref == @$val
336 0 1178 unless __reccmp($ref->[$_], $val->[$_])
340 0 115 unless keys %$ref == keys %$val
342 1 1184 unless __reccmp($ref->{$_}, $val->{$_})