Branch Coverage

lib/Test/WWW/Mechanize/Catalyst.pm
Criterion Covered Total %
branch 48 70 68.5


line true false branch
41 0 15 ref $_[0] ? :
47 3 42 defined $n && exists $args->{$n} ? :
52 11 4 $APP_CLASS ? :
67 28 2 unless ($ENV{'CATALYST_SERVER'})
68 0 28 unless $self->has_catalyst_app
70 3 25 unless is_class_loaded($self->catalyst_app)
79 34 1 unless $response->header('Content-Base')
82 35 0 if $self->cookie_jar
85 0 34 if (not $self->{'catalyst_debug'} and $response->code == 500 and $response->content =~ /on Catalyst \d+\.\d+/)
99 6 29 if $previous
100 35 0 defined $response->redirects ? :
101 1 34 if ($redirects > 0 and $redirects >= $self->max_redirect)
106 6 28 if ($response->header('Location') and $response->is_redirect and $self->redirect_ok($request, $response)) { }
110 1 5 if $self->max_redirect <= 0
142 36 0 unless ($request->header('Host'))
143 1 35 $self->has_host ? :
146 5 31 if $request->uri->_port
155 5 31 unless defined $uri->scheme
156 5 31 unless defined $uri->host
159 36 0 if $self->cookie_jar
163 5 31 if $ENV{'CATALYST_SERVER'}
168 0 31 if $res
171 3 28 if @creds
176 31 0 $Catalyst::VERSION >= 5.89 ? :
189 0 36 unless $request->uri->can('host_port')
191 0 36 if ($self->allow_external and $request->uri->host_port ne 'localhost:80')
201 0 5 if $res
205 0 5 if ($server->path =~ m[^(.+)?/$])
207 0 0 if $path
213 0 5 if ($server->path)
221 0 0 if (@rp)
223 0 0 $sp eq $rp[0] ? :
228 0 0 if ($add_trailing)
244 7 3 if (defined $app)
245 6 1 unless is_class_loaded($app)