Branch Coverage

blib/lib/File/BLOB.pm
Criterion Covered Total %
branch 39 90 43.3


line true false branch
132 0 6 ref $_[0] ? :
173 0 2 ref $_[0] ? :
178 0 2 unless ($path and -e $path)
181 0 2 unless (-r _)
187 2 0 unless (exists $params{'filename'})
188 0 2 unless my $file = File::Basename::basename($path)
195 0 2 unless ($handle)
227 0 9 ref $_[0] ? :
228 4 5 unless my $cgi = &Params::Util::_INSTANCE(shift(), 'CGI')
232 3 2 unless &Params::Util::_SCALAR(\$param)
237 2 0 unless my(@handles) = $cgi->upload($param)
238 0 0 unless (wantarray)
249 0 0 unless my $headers = $cgi->uploadInfo($fh)
252 0 0 unless my $file = 'File::BLOB'->new($fh, %$headers)
259 0 0 wantarray ? :
319 3 3 if (&Params::Util::_SCALAR($data)) { }
2 1 elsif (&Params::Util::_INSTANCE($data, 'IO::Handle')) { }
1 0 elsif (defined $data and not ref $data) { }
324 2 0 if $data->can('binmode')
326 0 2 unless (defined $data and not ref $data)
392 0 13 unless @_
395 13 0 if (defined $value) { }
431 3 10 if $name eq 'content'
460 10 3 if (&bytes::length($header))
461 0 10 unless ($header =~ /^(.+?): (.+)\z/s)
470 0 3 unless (defined $headers{'content_length'})
473 0 3 unless ($headers{'content_length'} == &bytes::length($serialized))
502 0 0 unless $file
503 0 0 unless -e $file
504 0 0 unless -f _
505 0 0 unless -r _
510 0 0 unless $handle
513 0 0 unless length $line
514 0 0 unless ($line =~ /^(\w+):\s*(.+?)\s$/)
521 0 0 unless ($headers{'class'} eq $class)
541 0 24 unless (defined $name)
544 0 24 if (ref $name)
547 0 24 if ($name eq '')
553 0 24 unless (&Params::Util::_IDENTIFIER($name))
556 0 24 if ($name eq 'content')
569 0 13 unless (defined $value)
573 0 13 if (ref $value)
576 0 13 if ($value eq '')
581 0 13 if ($value =~ /\n/s)
591 0 2 unless my $data = &Params::Util::_SCALAR(shift())