Condition Coverage

blib/lib/CGI/Tiny.pm
Criterion Covered Total %
condition 91 136 66.9


and 3 conditions

line !l l&&!r l&&r condition
102 75 0 0 @ARGV and not defined $ENV{'REQUEST_METHOD'}
135 21 1 9 defined $cgi->{'response_status'} and $cgi->{'response_status'} =~ /^[45][0-9]{2} /
275 1 0 2 $ENV{'CONTENT_TYPE'} and $ENV{'CONTENT_TYPE'} =~ m[^application/json\b]i
291 1 6 2 $ENV{'CONTENT_TYPE'} and $ENV{'CONTENT_TYPE'} =~ m[^application/x-www-form-urlencoded\b]i
1 0 6 $ENV{'CONTENT_TYPE'} and $ENV{'CONTENT_TYPE'} =~ m[^multipart/form-data\b]i
345 1 0 8 $ENV{'CONTENT_TYPE'} and $ENV{'CONTENT_TYPE'} =~ m[^multipart/form-data\b]i
358 0 0 6 $ENV{'CONTENT_TYPE'} and $ENV{'CONTENT_TYPE'} =~ m[^multipart/form-data\b]i
391 0 11 1 $limit and $length > $limit
449 0 14 1 defined $status and $status =~ /\A[0-9]+ [^\r\n]*\z/
482 1 35 0 defined $content_type and $content_type =~ tr/\n\r//
490 0 2 0 defined $charset and $charset =~ /[^a-zA-Z0-9!#\$%&'*+\-.^_`|~]/
539 0 0 15 defined $self->{'response_status'} and $self->{'response_status'} =~ /\A([0-9]+)/
552 22 43 0 length $type and not exists $RENDER_TYPES{$type}
564 1 0 4 uc $charset eq 'UTF-8' and do { local $@; eval { do { require Unicode::UTF8; 1 } } }
609 5 12 0 length $type and not exists $RENDER_TYPES{$type}
626 1 0 3 uc $charset eq 'UTF-8' and do { local $@; eval { do { require Unicode::UTF8; 1 } } }
659 77 0 0 defined $self->{'debug_method'} and not $self->{'debug_verbose'}
666 0 12 65 not $headers_set{'content-length'} and defined $content_length
669 0 77 0 not $headers_set{'content-disposition'} and defined $self->{'response_disposition'} || defined $self->{'response_filename'}
683 0 74 3 not $headers_set{'location'} and $type eq 'redirect'
686 0 3 74 not $headers_set{'content-type'} and $type ne 'redirect'
690 11 7 22 defined $content_length and $content_length == 0
704 1 1 1 defined $status && $status =~ /^3[0-9]{2} /
74 1 2 $type eq 'redirect' and not defined $status && $status =~ /^3[0-9]{2} /
706 0 38 37 not $headers_set{'status'} and defined $status
709 0 0 2 defined $protocol and length $protocol
712 0 1 1 defined $server and length $server
766 1 17 0 length $year == 4 && $year < 1900

or 2 conditions

line l !l condition
95 0 8 $cgi ||= bless({'pid', $$}, $_[0])
101 5 70 $cgi ||= bless({'pid', $$}, 'CGI::Tiny')
261 0 5 $self->{'request_body_buffer'} || $ENV{'CGI_TINY_REQUEST_BODY_BUFFER'} || 262144
390 12 0 $ENV{'CONTENT_LENGTH'} || 0
556 58 4 $ENV{'REQUEST_METHOD'} || ''
594 0 1 $self->{'response_body_buffer'} || $ENV{'CGI_TINY_RESPONSE_BODY_BUFFER'} || 131072
620 17 0 $ENV{'REQUEST_METHOD'} || ''
646 0 2 $self->{'response_body_buffer'} || $ENV{'CGI_TINY_RESPONSE_BODY_BUFFER'} || 131072

or 3 conditions

line l !l&&r !l&&!r condition
135 1 18 13 $cgi->{'headers_rendered'} or defined $cgi->{'response_status'} and $cgi->{'response_status'} =~ /^[45][0-9]{2} /
256 0 0 6 exists $self->{'body_content'} or exists $self->{'body_parts'}
326 5 5 0 defined $value_charset or not defined $headers->{'content-type'}
10 0 0 defined $value_charset or not defined $headers->{'content-type'} or $headers->{'content-type'} =~ m[^text/plain\b]i
420 0 0 7 $self->{'request_body_buffer'} || $ENV{'CGI_TINY_REQUEST_BODY_BUFFER'}
556 3 1 57 $type eq 'text' or $type eq 'html'
4 1 56 $type eq 'text' or $type eq 'html' or $type eq 'xml'
620 2 2 11 $type eq 'text' or $type eq 'html'
4 0 11 $type eq 'text' or $type eq 'html' or $type eq 'xml'
1 1 5 $type eq 'file' or $type eq 'handle'
669 3 0 74 defined $self->{'response_disposition'} || defined $self->{'response_filename'}
690 34 28 12 defined $content_type or defined $content_length and $content_length == 0