Branch Coverage

blib/lib/cPanel/TaskQueue/Task.pm
Criterion Covered Total %
branch 68 68 100.0


line true false branch
53 1 150 unless defined $args
54 1 149 unless 'HASH' eq ref $args
55 2 147 unless exists $$args{'cmd'} and $$args{'cmd'} =~ /\S/
56 3 144 if exists $$args{'nsid'} and not _is_valid_ns($$args{'nsid'})
57 3 141 unless _is_pos_int($$args{'id'})
59 118 23 exists $$args{'nsid'} ? :
65 107 34 if (exists $$args{'timeout'})
67 3 104 unless _is_pos_int($timeout)
70 5 133 if (exists $$args{'retries'})
72 1 4 unless _is_pos_int($retries)
75 4 133 if (exists $$args{'userdata'})
81 19 116 unless defined $argstring
111 1 31 unless defined $hash
112 5 26 if ref $hash eq $class
113 2 24 unless ref {} eq ref $hash
116 11 135 unless exists $$hash{$field}
117 19 116 if $field eq '_pid' or $field eq '_started'
118 8 108 unless defined $$hash{$field}
120 2 3 unless ref [] eq ref $$hash{'_args'}
124 3 27 if (ref [] eq ref $$hash{$field}) { }
147 113 113 if (ref [] eq ref $_)
165 2 6 if (exists $parms{'timeout'})
166 1 1 unless _is_pos_int($parms{'timeout'})
169 2 5 if (exists $parms{'retries'})
170 1 1 unless _is_pos_int($parms{'retries'})
173 3 3 if (exists $parms{'userdata'})
198 1 7 unless defined $key
199 2 5 unless exists $$self{'_userdata'}{$key}
213 1 5 unless $$self{'_retries'}
232 1 259 unless defined $val
233 7 252 unless $val =~ /^\d+$/
250 2 5 unless 'HASH' eq ref $arg
253 8 7 if ref $v
255 2 3 if (@bad_keys)