Branch Coverage

blib/lib/CGI/Alert.pm
Criterion Covered Total %
branch 14 106 13.2


line true false branch
99 0 6 if (defined &{$_[$i];}) { }
6 0 elsif ($_[$i] =~ /^-{0,2}hide=(.+)$/) { }
105 2 4 if ($hide =~ m[^/(.*)/$]) { }
1 3 elsif ($hide =~ /^m(.)(.*)\1$/) { }
1 2 elsif ($hide =~ /^(qr(.)(.*)\2[ismx]*)$/) { }
112 1 5 if ($@) { }
145 0 1 if (($ENV{'REQUEST_URI'} || '') =~ m[/(~|%7e)([^/]+)/]i)
147 0 0 if (getpwnam $2)
155 0 1 if (exists $INC{'CGI.pm'})
163 0 0 if $@
176 0 0 if $f =~ m[/([^/]+)$]
209 0 0 if ($levels[$#levels]{'subroutine'} =~ /^CGI::Alert::_(warn|die)$/)
217 0 0 if $maxlen < $len
229 0 0 if ($filename eq $last_filename) { }
245 0 0 if (not defined $arg) { }
0 0 elsif (not ref $arg) { }
250 0 0 if $arg =~ /\D/
274 0 0 if ($just_mail =~ s/^(.*)<(.*)>(.*)$/$2/)
300 0 0 $DEBUG_SENDMAIL ? :
305 0 0 unless (open SENDMAIL, $sendmail)
312 0 0 if (($env{'HTTP_HOST'} || '') =~ /^(([\w\d.-]+)(:\d+)?)$/)
323 0 0 if exists $env{'REMOTE_USER'} and $env{'REMOTE_USER'}
329 0 0 $subject =~ /warn/i ? :
335 0 0 if defined $main::VERSION
360 0 0 if (exists $env{'REMOTE_USER'} or exists $env{'REMOTE_ADDR'})
363 0 0 if (exists $env{'REMOTE_USER'})
365 0 0 if exists $env{'REMOTE_ADDR'}
367 0 0 if (exists $env{'REMOTE_ADDR'})
372 0 0 if ($@) { }
387 0 0 if $subject =~ /FATAL/
404 0 0 if @cgi_params
420 0 0 if $maxlen < length $$set[0]
428 0 0 if grep {$p =~ /$_/;} @Hide
431 0 0 defined $v[0] ? :
443 0 0 if (@warnings_traced)
489 0 0 unless close SENDMAIL
506 0 0 if ($status =~ /^--?no-?(mail|alert)$/)
531 0 0 if ($INC{'CGI.pm'})
571 0 0 if (@warnings < 10) { }
576 0 0 if @warnings == 10
582 0 0 unless $DEBUG_SENDMAIL
589 0 1 if (@warnings)
593 0 0 if (@_) { }
0 0 elsif ($?) { }
616 2 0 if $^S or not defined $^S
622 0 0 unless $DEBUG_SENDMAIL
630 0 0 if ($Browser_Text) { }
632 0 0 if ($Emit_HTTP_Headers and not $DEBUG_SENDMAIL)
640 0 0 if ($what eq 'CODE') { }
0 0 elsif (not $what) { }
650 0 0 unless $DEBUG_SENDMAIL
666 0 0 if (@warnings)
677 0 0 unless $DEBUG_SENDMAIL