Branch Coverage

blib/lib/CGI/LogCarp.pm
Criterion Covered Total %
branch 89 198 44.9


line true false branch
686 8 10 unless scalar @_
687 0 10 if ($_[0] eq 'verbose') { }
1 9 elsif ($_[0] eq '*STDLOG') { }
1 8 elsif ($_[0] eq '*STDBUG') { }
8 0 elsif ($_[0] eq '*STDERR') { }
0 0 elsif ($_[0] eq 'fatalsToBrowser') { }
691 1 0 unless ($CGI::LogCarp::STDLOG)
692 0 1 unless open STDLOG, '>&STDERR'
699 1 0 unless ($CGI::LogCarp::STDBUG)
700 0 1 unless open STDBUG, '>&STDOUT'
707 6 2 unless (fileno \*CGI::LogCarp::STDERR)
708 0 6 unless open CGI::LogCarp::STDERR, '>&STDERR'
740 0 6 unless open main::_STDERR, '>&STDERR'
853 3 26 if (defined $value)
856 0 3 if scalar grep({/^$value$/i;} @$NO)
857 0 3 if scalar grep({/^$value$/i;} @$YES)
858 0 3 if scalar grep({/^$value$/i;} @$TRACE)
864 0 3 if $CGI::LogCarp::DEBUGLEVEL and not $CGI::LogCarp::LOGLEVEL
901 3 14 if (defined $value)
904 0 3 if scalar grep({/^$value$/i;} @$NO)
905 0 3 if scalar grep({/^$value$/i;} @$YES)
926 0 15 unless $message =~ /\n$/
930 3 12 if ($CGI::LogCarp::STDBUG)
931 3 0 unless &is_STDERR(\*main::STDBUG)
933 3 12 if ($CGI::LogCarp::STDLOG)
934 3 0 unless &is_STDERR(\*main::STDLOG) or &is_STDBUG(\*main::STDLOG)
957 0 1 unless $message =~ /\n$/
958 0 1 if $CGI::LogCARP::fatalsToBrowser and not _longmess() =~ /eval [{']/m
966 0 1 if ($CGI::LogCarp::STDBUG)
967 0 0 unless &is_STDERR(\*main::STDBUG)
969 0 1 if ($CGI::LogCarp::STDLOG)
970 0 0 unless &is_STDERR(\*main::STDLOG) or &is_STDBUG(\*main::STDLOG)
991 0 0 if $mod_perl
1073 0 0 unless (scalar @_)
1080 0 0 if (&is_STDERR($fh)) { }
0 0 elsif (&is_STDLOG($fh)) { }
0 0 elsif (&is_STDBUG($fh)) { }
1103 4 0 unless $message =~ /\n$/
1107 0 4 if ($CGI::LogCarp::STDBUG)
1108 0 0 unless &is_STDLOG(\*main::STDBUG)
1124 1 3 unless &DEBUGLEVEL() > 0
1127 3 0 unless $message =~ /\n$/
1146 3 1 unless &DEBUGLEVEL() > 1
1149 1 0 unless $message =~ /\n$/
1171 0 0 unless $message =~ /\n$/
1175 0 0 if ($CGI::LogCarp::STDBUG)
1176 0 0 unless &is_STDERR(\*main::STDBUG) or &is_realSTDERR(\*main::STDBUG)
1182 0 0 if ($CGI::LogCarp::STDLOG)
1183 0 0 unless &is_STDERR(\*main::STDLOG) or &is_STDBUG(\*main::STDLOG) or &is_realSTDERR(\*main::STDLOG)
1191 0 0 unless &is_realSTDERR(\*STDERR)
1210 0 6 unless $fh = to_filehandle($fh)
1211 1 5 if (&is_STDERR($fh)) { }
1212 0 1 unless open STDERR, '>&main::_STDERR'
1215 0 5 unless my $no = fileno $fh
1216 0 5 unless open STDERR, '>&' . $no
1238 0 2 unless $fh = to_filehandle($fh)
1239 1 1 if (&is_STDLOG($fh)) { }
1240 0 1 unless open main::STDLOG, '>&main::_STDERR'
1243 0 1 unless my $no = fileno $fh
1244 0 1 unless open main::STDLOG, '>&' . $no
1266 0 2 unless $fh = to_filehandle($fh)
1267 1 1 if (&is_STDBUG($fh)) { }
1268 0 1 unless open main::STDBUG, '>&STDOUT'
1271 0 1 unless my $no = fileno $fh
1272 0 1 unless open main::STDBUG, '>&' . $no
1286 0 0 $ENV{'SERVER_ADMIN'} ? :
1295 0 0 if ($CGI::LogCarp::CUSTOM_STDERR_MSG)
1296 0 0 if (ref $CGI::LogCarp::CUSTOM_STDERR_MSG eq 'CODE') { }
1324 0 120 unless $thingy
1325 120 0 if UNIVERSAL::isa($thingy, 'GLOB')
1326 0 0 if UNIVERSAL::isa($thingy, 'FileHandle')
1327 0 0 unless (ref $thingy)
1330 0 0 $thingy =~ /[\':]/ ? :
1331 0 0 if defined fileno $tmp
1437 0 15 if ($CGI::LogCarp::CUSTOM_STDERR_MSG)
1438 0 0 if (ref $CGI::LogCarp::CUSTOM_STDERR_MSG eq 'CODE')
1461 0 1 if ($CGI::LogCarp::CUSTOM_STDERR_MSG)
1462 0 0 if (ref $CGI::LogCarp::CUSTOM_STDERR_MSG eq 'CODE')
1489 2 5 unless &LOGLEVEL() > 0
1491 0 5 if ($CGI::LogCarp::CUSTOM_STDLOG_MSG)
1492 0 0 if (ref $CGI::LogCarp::CUSTOM_STDLOG_MSG eq 'CODE')
1514 1 6 unless &DEBUGLEVEL() > 0
1516 0 6 if ($CGI::LogCarp::CUSTOM_STDBUG_MSG)
1517 0 0 if (ref $CGI::LogCarp::CUSTOM_STDBUG_MSG eq 'CODE')
1543 0 0 if ($CGI::LogCarp::CUSTOM_STDERR_MSG)
1544 0 0 if (ref $CGI::LogCarp::CUSTOM_STDERR_MSG eq 'CODE')
1613 0 25 unless $fh1 = to_filehandle($fh1)
1614 0 25 unless $fh2 = to_filehandle($fh2)
1617 0 25 unless defined $fno1 or defined $fno2
1618 3 22 unless defined $fno1 and defined $fno2
1621 15 7 if $device1 == $device2
1643 0 27 unless $fh = to_filehandle($fh)
1644 0 27 unless my $no = fileno $fh
1645 0 27 unless -f $fh and -w _
1664 0 33 unless $fh = to_filehandle($fh)
1665 0 33 unless my $no = fileno $fh
1666 2 31 unless -f $fh and -w _
1677 10 0 if ref $_[0]
1679 0 10 @_ > 1 ? :