Branch Coverage

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


line true false branch
37 1 941 if @_ % 2
39 939 2 if @_
48 3 1978 if (@_ < 2 and not defined wantarray)
49 2 1 if $^W
53 964 1014 if (@_ == 0) { }
0 2028 elsif (@_ == 1 and $_[0] eq 'Cache') { }
64 0 1014 if (@_ == 1) { }
1014 0 elsif (@_ % 2 == 0) { }
70 934 507 if (exists $arg{'Cache'}) { }
71 0 934 if ($self->{'parsed'}) { }
1 933 elsif (ref $arg{'Cache'}) { }
78 933 0 if (defined $arg{'Cache'})
81 2 931 if $@
83 1 932 if $@
84 2 931 if (@missing)
85 2 0 if $^W
98 121 892 if (@args)
100 44 77 if $@
122 3 0 unless (defined wantarray)
123 2 1 if $^W
130 0 0 if ($_)
131 0 0 ref $_ eq 'ARRAY' ? :
143 6 44 if defined $error
144 12 32 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 931 96 if (defined $self->{'cache'})
181 1 930 if $self->{'parsed'}
185 47 883 if ($self->__can_use_cache)
191 30 17 unless ($@ or @WARN)
206 23 973 if ($_[0] eq 'file') { }
214 63 933 if ($@) { }
219 900 33 if defined $self->{'cache'}
232 5 925 unless (-e $self->{'cache'} and -s _)
233 0 5 if $ENV{'CBCC_DEBUG'}
237 0 925 unless ($fh->open($self->{'cache'}))
238 0 0 if $^W
239 0 0 if $ENV{'CBCC_DEBUG'}
246 0 925 unless (defined($config = readline $fh))
247 0 0 if $ENV{'CBCC_DEBUG'}
250 5 920 unless ($config =~ /^#if\s+0/)
251 0 5 if $ENV{'CBCC_DEBUG'}
262 0 53 if ($@ or @warnings or @config % 2)
263 0 867 if $ENV{'CBCC_DEBUG'}
269 23 30 exists $self->{'code'} ? :
271 2 50 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 1127 unless (-e $file)
286 0 0 if $ENV{'CBCC_DEBUG'}
290 1 1124 unless ($spec->{'size'} == $size and $spec->{'mtime'} == $mtime and $spec->{'ctime'} == $ctime)
293 0 3 if $ENV{'CBCC_DEBUG'}
300 0 47 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 4038 unless defined $ref and defined $val
331 3686 352 unless ref $ref
333 201 151 if (ref $ref eq 'ARRAY') { }
151 0 elsif (ref $ref eq 'HASH') { }
334 1 200 unless @$ref == @$val
336 0 2472 unless __reccmp($ref->[$_], $val->[$_])
340 0 151 unless keys %$ref == keys %$val
342 1 1524 unless __reccmp($ref->{$_}, $val->{$_})