Branch Coverage

blib/lib/Mail/Alias.pm
Criterion Covered Total %
branch 17 86 19.7


line true false branch
45 1 0 if (defined $_[0])
85 0 0 unless defined @{$pkg . '::ISA';}
123 0 2 if ($$self{'_usemem'}) { }
134 0 2 unless open ALIASES_FILE, $aliases_file
138 1 12 if (/^$alias:/i)
167 0 0 if defined $done{$alias}
169 0 0 if (defined $$me{$alias}) { }
176 0 0 wantarray ? :
192 0 1 unless ($alias)
198 0 1 if ($self->exists($alias)) { }
205 0 1 unless open ALIASES_FILE, ">>$aliases_file"
233 0 1 unless open NEW_FILE, ">$filename"
237 0 1 unless open EXISTING_FILE, "$working_file"
247 4 3 if ($textline =~ /^\s*$/ or $textline =~ /^#/) { }
255 2 1 if (not alias_check($textline, \@alias_list)) { }
290 0 0 if ($address_string) { }
308 0 0 unless open NEW_FILE, ">$filename"
312 0 0 unless open EXISTING_FILE, "$working_file"
322 0 0 if ($textline =~ /^\s+$/ or $textline =~ /^#/) { }
329 0 0 if ($textline =~ /^$alias:/i) { }
365 0 0 if ($alias =~ /[$alias_nochar]/ or length $alias > $max_alias_length)
387 0 1 if ($newname) { }
390 0 0 if (-e $newname) { }
463 1 2 if ($text =~ /^\s*$$list[$list_index]:?\s*$/i)
494 0 0 if $filename
511 0 0 if (ref $file) { }
515 0 0 unless open ALIAS, $file
520 0 0 unless ($alias =~ /^_/)
527 0 0 if $fd == \*ALIAS
538 0 0 unless open INC, $file
554 0 0 unless open ALIAS, $file
561 0 0 if (defined $line and /^\s/) { }
565 0 0 if (defined $line)
566 0 0 if ($line =~ s/^([^:]+)://)
582 0 0 if /^#/ or /^\s*$/
614 0 0 if $filename
628 0 0 unless open ALIAS, $file
631 0 0 unless /^\s*(alias|group)\s+(\S+)\s+(.*)/
661 0 0 if (ref $file) { }
665 0 0 unless open ALIAS, $file
671 0 0 if /\s/
672 0 0 unless ($alias =~ /^_/)
677 0 0 if $fd == \*ALIAS