Branch Coverage

blib/lib/DDG/Rewrite.pm
Criterion Covered Total %
branch 47 62 75.8


line true false branch
12 7 13 $self->has_callback ? :
13 1 19 if $to =~ s/\{\{callback\}\}/$callback/g and not $self->has_callback
18 3 1 if (defined $ENV{$_}) { }
26 1 18 if @missing_envs
121 0 16 if $self->wrap_jsonp_callback and $self->wrap_string_callback
129 16 0 if $spice_name
134 1 15 if (ref $timeouts eq 'HASH' and keys %$timeouts)
135 1 0 if $timeouts->{'connect'}
136 1 0 if $timeouts->{'send'}
137 1 0 if $timeouts->{'read'}
140 4 12 if ($self->headers)
141 2 2 if (ref $self->headers eq 'HASH') { }
1 1 elsif (ref $self->headers eq 'ARRAY') { }
156 1 15 if ($self->has_post_body)
173 1 15 if ($uses_echo_module)
181 2 14 if ($uses_echo_module or $content_type_javascript)
190 1 15 if $wrap_jsonp_callback
191 0 16 if $wrap_string_callback
194 16 0 if ($spice_name) { }
201 3 13 $self->has_from ? :
203 2 14 if $is_duckduckgo
204 8 8 if $scheme =~ /https/
206 2 14 if ($self->has_proxy_cache_valid)
214 0 16 if $self->has_proxy_ssl_session_reuse
215 1 15 if $wrap_jsonp_callback
216 0 16 if $wrap_string_callback
222 4 12 if ($callback)
224 0 4 if ($self->error_fallback) { }
234 0 16 if ($self->error_fallback)
237 0 0 if $wrap_jsonp_callback
239 0 0 if $wrap_jsonp_callback