Branch Coverage

blib/lib/YATT/Lite/Connection.pm
Criterion Covered Total %
branch 54 98 55.1


line true false branch
88 408 2978 if (my $sub = $class->can("configure_$name")) { }
0 2978 elsif (not exists $$fields{"cf_$name"}) { }
96 241 0 wantarray ? :
101 0 241 defined $_[0] ? :
102 0 241 $prop->{'cf_encoding'} ? :
105 0 241 unless open $_[0], ">$enc", $prop->{'cf_buffer'}
123 0 0 $prop->{'cf_encoding'} ? :
129 0 37 if @_ < 2
130 0 37 if @_ > 3
134 0 37 unless (exists $$fields{"cf_$name"})
145 0 383 unless (defined $name)
149 180 203 if (my $sub = $glob->can("configure_$name")) { }
0 203 elsif (not exists $$fields{"cf_$name"}) { }
157 0 383 if (wantarray) { }
172 0 0 if /^cf_/
188 11 0 if (my $buf = $prop->{'cf_buffer'})
192 0 11 if @_
211 5 4 if (my $yatt = $prop->{'cf_yatt'}) { }
0 4 elsif (my $system = $prop->{'cf_system'}) { }
216 2 2 if @err and ref $err[0] eq 'HASH'
224 0 0 if (my YATT::Lite::Connection::Env $env = $prop->{'cf_env'}) { }
0 0 elsif (fileno STDERR) { }
248 0 4 unless $fh or $logger
250 1 1 do { $_[0] =~ /^[\w\.\-]+$/ } ? :
1 2 do { ref $_[0] } ? :
3 1 defined $_[0] ? :
263 4 0 if ($fh) { }
296 1 240 if (my $backend = delete $prop->{'cf_backend'})
297 0 1 if ($prop->{'cf_debug'} and my $errfh = $glob->error_fh)
303 0 241 if ($prop->{'cf_debug'} and my $errfh = $glob->error_fh)
314 0 0 if ($parent and my $sub = $parent->can('header_was_sent'))
322 385 238 if $prop->{'header_was_sent'}++
326 27 211 unless ($prop->{'cf_noheader'})
335 218 23 if $prop->{'cf_yatt'}
336 230 11 if $prop->{'cf_system'}
337 0 241 if $prop->{'cookies_out'}
343 14 227 if ($prop->{'cf_parent_fh'})
366 0 0 if (defined $env->{'HTTP_COOKIE'}) { }
377 0 0 if (@_ == 1 and ref $_[0]) { }
396 0 0 unless $prop->{'cookies_out'}
415 1 26 $_ ? :
423 27 0 if ($ct =~ m[^text/] and not $ct =~ /;\s*charset/)
455 145 2 unless my $headers = $prop->{'headers'}
486 0 0 do { @_ == 1 } ? :
0 0 @_ ? :
517 0 1 unless @_
520 0 1 do { not my $sub = $prop->{'cf_backend'}->can($method) } ? :
0 1 do { not $prop->{'cf_backend'} } ? :
1 0 defined $method ? :