Branch Coverage

blib/lib/News/Newsrc.pm
Criterion Covered Total %
branch 115 124 92.7


line true false branch
20 4 21 if $file
30 3 12 unless $file
35 3 12 unless open NEWSRC, $file
40 2 10 if $@
58 13 3 ref $_[0] ? :
67 2 44 if $@
78 2 44 unless $line =~ /\S/
81 1 43 unless $line =~ /^ ([^!:]+) ([!:]) (.*) $/x
86 1 42 unless 'Set::IntSpan'->valid($articles)
102 2 4 unless $$newsrc{'file'}
111 1 6 if -e $file
115 0 7 unless open NEWSRC, "> $file"
121 0 7 if $@
132 1 0 $$group{'subscribed'} ? :
134 1 0 $articles ? :
135 0 1 unless print NEWSRC "$name$sub$space$articles\n"
147 4 2 $$group{'subscribed'} ? :
149 6 0 $articles ? :
152 1 1 wantarray ? :
164 262 5 $$group{'subscribed'} ? :
166 62 205 if $articles =~ /^\d/
178 2 57 if ($$newsrc{'group'}{$name})
180 1 1 unless $options{'replace'}
199 0 13 unless $group
211 1 5 if $offset > @$array
212 1 5 if $offset < -@$array
224 35 36 if $options{'where'}
225 14 57 if ref $where
229 15 56 if /first/
230 2 69 if /last/
231 36 35 if /^$/
232 4 67 if /alpha/
233 4 67 if /before/
234 4 67 if /after/
235 6 65 if /number/
247 3 10 if ($name lt $$list[$i]{'name'})
265 2 25 if ($$list[$i]{'name'} eq $before)
283 2 25 if ($$list[$i]{'name'} eq $after)
298 1 2 unless $$newsrc{'group'}{$name}
310 2 1 unless $$newsrc{'group'}{$name}
318 2 1 unless $$newsrc{'group'}{$name}
326 2 204 unless $$newsrc{'group'}{$name}
334 2 2 unless $$newsrc{'group'}{$name}
344 4 1 unless $$newsrc{'group'}{$name}
355 2 1 unless $$newsrc{'group'}{$name}
363 2 1 unless $$newsrc{'group'}{$name}
373 2 1 unless $$newsrc{'group'}{$name}
384 8 4 $$newsrc{'group'}{$name} ? :
391 2 1 if $newsrc->exists($name)
400 4 1 if $newsrc->exists($name)
417 2 1 wantarray ? :
426 1 1 wantarray ? :
435 1 1 wantarray ? :
442 3 2 unless $$newsrc{'group'}{$name}
444 2 3 wantarray ? :
451 3 2 unless $$newsrc{'group'}{$name}
455 2 3 wantarray ? :
461 2 16 unless $$newsrc{'group'}{$name}
470 5 6 unless 'Set::IntSpan'->valid($articles)
472 0 6 unless $set->finite
474 0 6 if defined $min and $min < 0
476 3 3 unless $$newsrc{'group'}{$name}