Branch Coverage

blib/lib/URLprocessor.pm
Criterion Covered Total %
branch 73 94 77.6


line true false branch
59 3 0 if @_
62 3 0 if (defined $$self{'URL'} and $$self{'URL'} ne '')
94 3 2 unless @_
97 1 1 if defined $$self{'PROTOCOL'}
102 4 2 unless @_
109 4 2 unless @_
116 3 2 unless @_
119 1 1 if defined $$self{'HOST'}
124 6 4 unless @_
131 11 5 unless @_
135 2 3 if (ref $path eq '' or ref $path eq 'SCALAR') { }
2 1 elsif (ref $path eq 'ARRAY') { }
142 1 4 unless defined $$self{'LOCAL_PATH'}
159 4 2 unless @_
172 1 0 unless @_
180 1 9 @_ ? :
196 2 3 if defined $param and exists $$self{'PARAMS'}{$param}
208 3 0 if defined $param and defined $val
215 2 0 if defined $param
223 1 2 if defined $param and exists $$self{'PARAMS'}{$param}
238 6 0 if defined $$self{'PROTOCOL'}
239 5 1 if defined $$self{'LOGIN'} and defined $$self{'PASSWD'}
240 6 0 if defined $$self{'HOST'}
241 5 1 if defined $$self{'PORT'}
242 6 0 if (defined $$self{'LOCAL_PATH'})
243 0 6 unless $$self{'LOCAL_PATH'} =~ m[^/]
246 4 2 if $params_str ne ''
247 6 0 if defined $$self{'FRAGMENT'} and $$self{'FRAGMENT'} ne ''
283 3 14 if (not defined $params or $params eq '')
291 3 16 if $_ eq ''
294 11 5 if (scalar @param_val == 2 and $param_val[0] ne '' and $param_val[1] ne '') { }
315 0 3 unless defined $$self{'GLOBAL_PART'}
320 2 1 if defined $auth and $auth ne ''
323 0 3 unless defined $$self{'LOCAL_PART'}
343 0 11 unless defined $$self{'GLOBAL_PART'}
345 1 10 if not defined $$self{'PROTOCOL'} or $$self{'PROTOCOL'} eq ''
346 0 11 if not defined $$self{'LOGIN'} and defined $$self{'PASSWD'}
347 0 11 if defined $$self{'LOGIN'} and not defined $$self{'PASSWD'}
348 7 4 if (defined $$self{'LOGIN'} and defined $$self{'PASSWD'})
349 0 7 if $$self{'LOGIN'} eq '' and $$self{'PASSWD'} ne ''
350 0 7 if $$self{'LOGIN'} ne '' and $$self{'PASSWD'} eq ''
353 1 10 if not defined $$self{'HOST'} or $$self{'HOST'} eq ''
354 3 8 if defined $$self{'PORT'} and not $$self{'PORT'} =~ /^\d+$/
355 0 11 if (defined $$self{'LOCAL_PART'} and length $$self{'LOCAL_PART'} > 0 and not defined $$self{'LOCAL_PATH'})
359 0 0 if (not defined $$self{'LOCAL_PATH'} and scalar keys %{$$self{'PARAMS'};} || defined $$self{'FRAGMENT'})
363 0 11 if defined $$self{'PARAMS_VALID'} and $$self{'PARAMS_VALID'} == 0
365 6 5 if $msg eq ''