Branch Coverage

blib/lib/DDG/Rewrite.pm
Criterion Covered Total %
branch 45 60 75.0


line true false branch
12 6 13 $self->has_callback ? :
13 1 18 if $to =~ s/\{\{callback\}\}/$callback/g and not $self->has_callback
18 2 1 if (defined $ENV{$_}) { }
26 1 17 if @missing_envs
116 0 15 if $self->wrap_jsonp_callback and $self->wrap_string_callback
122 15 0 if $spice_name
127 1 14 if (ref $timeouts eq 'HASH' and keys %$timeouts)
128 1 0 if $timeouts->{'connect'}
129 1 0 if $timeouts->{'send'}
130 1 0 if $timeouts->{'read'}
133 4 11 if ($self->headers)
134 2 2 if (ref $self->headers eq 'HASH') { }
1 1 elsif (ref $self->headers eq 'ARRAY') { }
149 1 14 if ($self->has_post_body)
166 1 14 if ($uses_echo_module)
181 1 14 if $wrap_jsonp_callback
182 0 15 if $wrap_string_callback
185 15 0 if ($spice_name) { }
192 2 13 $self->has_from ? :
194 2 13 if $is_duckduckgo
195 8 7 if $scheme =~ /https/
197 1 14 if ($self->has_proxy_cache_valid)
205 0 15 if $self->has_proxy_ssl_session_reuse
206 1 14 if $wrap_jsonp_callback
207 0 15 if $wrap_string_callback
213 3 12 if ($callback)
215 0 3 if ($self->error_fallback) { }
225 0 15 if ($self->error_fallback)
228 0 0 if $wrap_jsonp_callback
230 0 0 if $wrap_jsonp_callback