Branch Coverage

blib/lib/Test/Mock/LWP/Dispatch.pm
Criterion Covered Total %
branch 32 40 80.0


line true false branch
32 33 0 if $DEFAULT_REQUEST_HEADERS and $mo->can('prepare_request')
39 2 33 unless defined $map
42 4 29 if (ref $req eq 'HTTP::Request') { }
20 9 elsif (ref $req eq '') { }
5 4 elsif (ref $req eq 'Regexp') { }
4 0 elsif (ref $req eq 'CODE') { }
43 4 0 if $DEFAULT_REQUEST_HEADERS and $mo->can('prepare_request')
49 2 2 unless $dd_in->Dump eq $dd->Dump
51 8 12 unless $in_req->uri eq $req
53 2 3 unless $in_req->uri =~ /$req/
55 2 2 unless &$req($in_req)
64 27 6 if (ref $matched_resp eq 'HTTP::Response') { }
6 0 elsif (ref $matched_resp eq 'CODE') { }
79 3 18 unless (defined $req and defined $resp)
82 1 17 unless (ref($req) =~ /^(HTTP::Request|Regexp|CODE|)$/)
85 1 16 unless (ref($resp) =~ /^(HTTP::Response|CODE)$/)
99 0 1 unless (defined $req)
110 0 3 unless defined $index and $index =~ /^\d+$/
111 0 3 unless ($mo->{'_maps'})
115 0 3 if ($index < 0 or $index > scalar(@{$mo->{'_maps'};}) - 1)