Branch Coverage

blib/lib/Bot/Cobalt/Utils.pm
Criterion Covered Total %
branch 59 86 68.6


line true false branch
72 0 9 unless $string
87 1 8 if (@_ > 1) { }
91 8 0 if (&reftype($_[0]) eq 'HASH') { }
101 32 2 defined $vars{$match} ? :
116 0 4 unless defined $glob
119 2 2 ref $_[0] eq 'ARRAY' ? :
128 0 6 unless defined $glob
145 0 8 unless defined $glob
153 8 74 if $pos == @chars
156 11 71 if ($first) { }
3 131 elsif ($last and $ch eq '$') { }
157 3 8 if ($ch eq '^')
169 0 76 if (grep {$_ eq $ch;} '.', '(', ')', '|', '^', '$', '@', '%', '{', '}')
176 6 70 if ($ch eq '*')
177 0 6 $in_esc ? :
181 2 68 if ($ch eq '?')
182 0 2 $in_esc ? :
186 3 65 if ($ch eq '+')
187 0 3 $in_esc ? :
191 0 65 if ($ch eq '[' or $ch eq ']')
192 0 0 $in_esc ? :
198 0 65 if ($ch eq '\\')
199 0 0 if ($in_esc) { }
231 1 3 unless $selected
234 0 4 if $str
235 1 3 unless $selected
244 0 4 unless ($timestr)
250 0 4 if $timestr =~ /^[0-9]+$/
257 1 5 if ($unit eq 'd')
262 1 4 if ($unit eq 'h')
267 2 2 if ($unit eq 'm')
281 0 8 unless defined $diff
295 0 3 unless defined $diff
299 0 3 if $days
300 0 3 if $hours
301 3 0 if $mins
302 1 2 if $sec
310 0 3 unless defined $diff
312 1 2 $days == 1 ? :
318 0 2 unless defined $diff
322 1 1 $yrs > 1 ? :
323 0 2 $days == 1 ? :
324 2 0 $yrs ? :