Branch Coverage

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


line true false branch
37 1 940 if @_ % 2
39 938 2 if @_
48 3 1976 if (@_ < 2 and not defined wantarray)
49 2 1 if $^W
53 963 1013 if (@_ == 0) { }
0 2026 elsif (@_ == 1 and $_[0] eq 'Cache') { }
64 0 1013 if (@_ == 1) { }
1013 0 elsif (@_ % 2 == 0) { }
70 933 491 if (exists $arg{'Cache'}) { }
71 0 933 if ($self->{'parsed'}) { }
1 932 elsif (ref $arg{'Cache'}) { }
78 932 0 if (defined $arg{'Cache'})
81 2 930 if $@
83 1 931 if $@
84 2 930 if (@missing)
85 2 0 if $^W
98 120 892 if (@args)
100 44 76 if $@
122 3 0 unless (defined wantarray)
123 2 1 if $^W
130 0 0 if ($_)
131 0 0 ref $_ eq 'ARRAY' ? :
143 6 43 if defined $error
144 12 31 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 930 96 if (defined $self->{'cache'})
181 1 929 if $self->{'parsed'}
185 46 883 if ($self->__can_use_cache)
191 29 17 unless ($@ or @WARN)
206 23 973 if ($_[0] eq 'file') { }
214 63 933 if ($@) { }
219 900 33 if defined $self->{'cache'}
232 5 924 unless (-e $self->{'cache'} and -s _)
233 0 5 if $ENV{'CBCC_DEBUG'}
237 0 924 unless ($fh->open($self->{'cache'}))
238 0 0 if $^W
239 0 0 if $ENV{'CBCC_DEBUG'}
246 0 924 unless (defined($config = readline $fh))
247 0 0 if $ENV{'CBCC_DEBUG'}
250 5 919 unless ($config =~ /^#if\s+0/)
251 0 5 if $ENV{'CBCC_DEBUG'}
262 0 52 if ($@ or @warnings or @config % 2)
263 0 867 if $ENV{'CBCC_DEBUG'}
269 23 29 exists $self->{'code'} ? :
271 2 49 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 1077 unless (-e $file)
286 0 0 if $ENV{'CBCC_DEBUG'}
290 1 1074 unless ($spec->{'size'} == $size and $spec->{'mtime'} == $mtime and $spec->{'ctime'} == $ctime)
293 0 3 if $ENV{'CBCC_DEBUG'}
300 0 46 if $ENV{'CBCC_DEBUG'}
309 1 899 unless $fh->open(">$self->{'cache'}")
311 877 22 exists $self->{'code'} ? :
328 11 0 unless defined $ref or defined $val
329 0 3924 unless defined $ref and defined $val
331 3574 350 unless ref $ref
333 200 150 if (ref $ref eq 'ARRAY') { }
150 0 elsif (ref $ref eq 'HASH') { }
334 1 199 unless @$ref == @$val
336 0 2366 unless __reccmp($ref->[$_], $val->[$_])
340 0 150 unless keys %$ref == keys %$val
342 1 1518 unless __reccmp($ref->{$_}, $val->{$_})