Branch Coverage

blib/lib/Mail/Alias.pm
Criterion Covered Total %
branch 36 90 40.0


line true false branch
45 2 0 if (defined $_[0])
85 0 0 unless @{$pkg . "::ISA";}
123 1 2 if ($self->{'_usemem'}) { }
134 0 2 unless open ALIASES_FILE, $aliases_file
138 1 24 if (/^$alias:/i)
167 0 2 if defined $done{$alias}
169 1 1 if (defined $me->{$alias}) { }
176 1 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 7 6 if ($textline =~ /^\s*$/ or $textline =~ /^#/) { }
255 5 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 5 if ($text =~ /^\s*$list->[$list_index]:?\s*$/i)
494 1 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 1 unless open INCLUDE, $file
554 0 1 unless open ALIAS, $file
560 12 1 if (defined $_)
562 1 11 if (defined $line and /^\s/)
567 4 8 if (defined $line)
568 4 0 if ($line =~ s/^([^:]+)://)
584 1 11 unless defined $_
585 7 4 if /^#/ or /^\s*$/
616 0 0 if $filename
630 0 0 unless open ALIAS, $file
633 0 0 unless /^\s*(alias|group)\s+(\S+)\s+(.*)/
663 0 0 if (ref $file) { }
667 0 0 unless open ALIAS, $file
673 0 0 if /\s/
674 0 0 unless ($alias =~ /^_/)
679 0 0 if $fd == \*ALIAS