Branch Coverage

blib/lib/Eidolon/Core/CGI.pm
Criterion Covered Total %
branch 49 98 50.0


line true false branch
77 1 2 if ($ENV{'QUERY_STRING'})
82 0 5 unless defined $key
88 2 1 if ($ENV{'REQUEST_METHOD'} and uc $ENV{'REQUEST_METHOD'} eq 'POST')
91 0 2 if ($ENV{'CONTENT_LENGTH'} > $$self{'max_post_size'})
94 1 1 if ($ENV{'CONTENT_TYPE'} =~ m[^multipart/form-data]) { }
98 0 1 unless $boundary
108 5 5 if ($stage == 0)
109 3 2 if (/^--$boundary(--)?\r\n$/o)
111 1 2 $1 ? :
112 2 1 if $buffer
115 2 3 if ($buffer)
117 1 1 if ($fh) { }
121 1 4 if $stage and $fh
122 1 4 if $stage == 4
123 2 2 $stage ? :
130 2 3 if ($stage == 1 and /^Content-Disposition: form-data; name="?([^"\s;]+)"?(?:; (filename)="?([^"\s;]*)"?)?\r\n$/o)
133 1 1 if ($2) { }
137 1 0 if ($3)
144 1 0 rindex($3, '.') != -1 ? :
167 1 2 if ($stage == 2 and /^Content-Type: ([^\r\n]+)\r\n$/o)
168 1 0 if $$self{'file'}{$key}
175 2 0 if ($stage == 3)
188 0 5 unless defined $key
195 0 3 if ($ENV{'HTTP_COOKIE'})
205 0 3 if ($sid = $self->get_cookie($$self{'session_cookie'}))
209 0 0 if (-f $filename and time - (stat $filename)[9] < $$self{'session_time'}) { }
259 3 0 defined $name ? :
270 4 0 defined $name ? :
285 0 0 if ($query)
289 0 0 if (index($query, '/') == 0)
290 0 0 if (rindex($query, '/') == $query_len - 1)
304 6 0 defined $name ? :
315 1 0 if ($name and $self->get_file($name))
334 1 0 exists $$self{'post'}{$name} ? :
1 1 exists $$self{'get'}{$name} ? :
346 0 3 exists $$self{'cookie'}{$name} ? :
358 0 0 if ($self->header_sent)
369 0 0 if ($expires)
396 1 0 unless $len
417 0 0 unless ($self->get_cookie($$self{'session_cookie'}))
435 0 0 unless $sid
458 0 0 if $self->session_started
469 0 0 $self->session_started ? :
498 0 0 if ($to)
516 0 0 if ($self->header_sent)
538 0 0 if ($$_{'path'})
539 0 0 if ($$_{'expires'})
540 0 0 if ($$_{'domain'})
548 0 0 if ($$self{'session'}{'id'})