Branch Coverage

blib/lib/LWP/UserAgent/Mockable.pm
Criterion Covered Total %
branch 30 36 83.3


line true false branch
16 11 0 unless (defined $instance)
28 9 2 defined $ENV{'LWP_UA_MOCK'} ? :
39 0 22 if (scalar @{$$instance{'actions'};})
43 9 13 unless (defined $action)
47 0 22 unless ($action =~ /^(playback|record|passthrough)/)
51 1 21 if ($action ne 'passthrough' and not defined $file)
69 5 16 if ($action eq 'playback') { }
79 0 18 unless (defined $current)
85 3 15 if ($$callbacks{'playback_validation'})
91 1 17 if ($$callbacks{'playback'})
94 0 1 unless (UNIVERSAL::isa($response, 'HTTP::Response'))
108 9 18 if ($$callbacks{'pre_record'})
111 3 6 if (not UNIVERSAL::isa($_[-1], 'HTTP::Response'))
126 9 15 if ($$callbacks{'record'})
132 3 6 unless (UNIVERSAL::isa($response, 'HTTP::Response'))
137 13 8 if ($action eq 'record')
157 3 6 if ($action eq 'record') { }
0 6 elsif ($action eq 'playback' and scalar @{$$instance{'actions'};}) { }