Condition Coverage

blib/lib/MVC/Neaf/Request.pm
Criterion Covered Total %
condition 83 142 58.4


and 3 conditions

line !l l&&!r l&&r condition
95 1 0 0 @fwd == 1 and $fwd[0]
269 0 0 5 $self->{'route'} and $self->{'route'}->path =~ m[^(?:/|$)]
485 1 3 1 length $value and $self->route->strict
539 0 0 0 length $value and $self->route->strict
886 0 0 4 length $value and $self->route->strict
932 9 0 0 defined $opt{'regex'} and not $cook =~ /^$opt{'regex'}$/
1109 3 0 34 ref $regex and ref $regex eq "Regexp"
1247 3 0 9 $id && $setup->{'engine'}->load_session($id)
1305 0 0 6 $hash and ref $hash eq "HASH"
1453 1 0 161 ref $data and UNIVERSAL::isa($data, "HASH")
1458 113 48 0 defined $data->{'-headers'} and ref $data->{'-headers'} ne 'ARRAY' || @{$data->{'-headers'};} % 2
1668 0 0 1 $id =~ /^[\x21-\x7E]+$/ and not $id =~ /[\s\"\\]/
1774 48 106 3 $data->{'-status'} == 200 and my $ttl = $self->route->cache_ttl

or 2 conditions

line l !l condition
125 2 5 $self->do_get_scheme || 'http'
153 159 0 $self->do_get_method || 'GET'
183 3 0 $self->do_get_hostname || 'localhost'
335 3 0 $port_scheme{$self->scheme} || 0
524 1 0 $self->{'query_string'} || ''
579 2 7 $self->{'multi_param'}{$name} ||= [map({&decode_utf8($_);} $self->do_get_param_as_array($name))]
989 9 151 $self->{'response'}{'cookie'} || {}
1112 26 2 $_ =~ /$regex/ or die 422
1462 161 0 $self->route->default || {}
1512 2 1 $self->{'stash'} ||= {}
1748 42 6 $data->{'-type'} ||= "text/plain"

or 3 conditions

line l !l&&r !l&&!r condition
93 0 1 0 $self->{'client_ip'} ||= do { my(@fwd) = $self->header_in("X-Forwarded-For", ".*"); "127.0.0.1" unless @fwd == 1 and $fwd[0] or $self->do_get_client_ip }
95 0 0 1 @fwd == 1 and $fwd[0] or $self->do_get_client_ip
153 187 159 1 $self->{'method'} ||= $self->do_get_method || 'GET'
183 0 3 1 $self->{'hostname'} ||= $self->do_get_hostname || 'localhost'
196 1 3 1 $self->{'port'} ||= $self->do_get_port
208 27 157 0 $self->{'path'} ||= $self->do_get_path
222 824 6 0 $self->{'route'} ||= "MVC::Neaf::Route::PreRoute"->new("method", "GET")
271 4 1 0 $self->{'prefix'} ||= $self->path
474 36 5 2 $regex ||= $self->{'route'}{'param_regex'}{$name}
521 0 1 0 $self->{'url_param_hash'} ||= do { my %hash; foreach $_ (split(/[&;]/, $self->{'query_string'} || '', 0)) { next unless /^(.*?)(?:=(.*))?$/; $hash{$1} = $2; } ; +{map({&decode_utf8(scalar uri_unescape($_));} %hash)} }
574 5 4 0 $regex ||= $self->{'route'}{'param_regex'}{$name}
650 3 0 0 $self->{'route'}->get_form($validator) || $self->_croak("Unknown form name $validator")
700 15 36 0 $self->{'cached_params'} ||= do { my $raw = $self->do_get_params; $_ = &decode_utf8($_) foreach (values %$raw); $raw }
872 8 23 0 $self->{'neaf_cookie_in'} ||= do { my %hash; foreach $_ ($self->header_in("cookie", qr/.*/)) { while (/(\S+?)=([^\s;]*);?/g) { $hash{$1} = &decode_utf8(scalar uri_unescape($2)); } ; } ; \%hash }
1100 14 29 0 $self->{'header_in'} ||= $self->do_get_header_in
1131 1 1 0 $self->{'referer'} ||= $self->header_in("referer", qr/.*/)
1169 0 6 0 $regex || qr/.*/
1262 0 0 1 $hash->{'expire'} || $setup->{'expire'}
1301 1 5 0 $id ||= $setup->{'engine'}->get_session_id
1312 6 0 0 $hash->{'id'} || $id
1387 214 160 0 $self->{'response'}{'header'} ||= "HTTP::Headers::Fast"->new
1458 0 0 48 ref $data->{'-headers'} ne 'ARRAY' || @{$data->{'-headers'};} % 2
1643 26 45 0 $self->{'id'} ||= $self->make_id
1668 0 1 0 not $id or $id =~ /^[\x21-\x7E]+$/ and not $id =~ /[\s\"\\]/
1848 26 69 0 $self->route && $self->route->helpers->{$name} || $impl
1956 6 0 0 ref $self || $self
1970 6 0 0 ref $self || $self