Branch Coverage

blib/lib/Mail/Cap.pm
Criterion Covered Total %
branch 29 56 51.7


line true false branch
37 1 0 if @_ % 2
45 1 0 if defined $args{'filename'} and -r $args{'filename'}
47 0 1 if (not defined $args{'filename'} or $take_all)
49 0 0 unless -r $fname
52 0 0 unless $take_all
56 0 1 unless ($self->{'_count'})
68 0 1 unless my $file = shift()
71 0 1 unless open MAILCAP, $file
78 1 12 if /^\s*#/
79 7 5 if /^\s*$/
87 1 4 unless $type =~ m[/]
94 3 3 if (defined $val) { }
104 1 4 if (my $test = $field{'test'})
105 0 1 unless ($test =~ /\%/)
108 0 0 if $?
113 4 1 unless (exists $self->{$type})
132 0 0 unless defined $cmd
149 0 5 unless $entry and exists $entry->{$method}
157 0 0 unless my $template = $self->nametemplate($type)
182 1 5 if $useCache and exists $self->{'_cache'}{$origtype}
190 2 4 if (exists $_->{'test'})
195 1 1 if $?
200 5 0 if $useCache
206 0 7 unless defined $type
207 0 7 unless defined $file
232 0 0 unless defined $prefix
240 0 0 if /^_/
248 0 0 if (exists $self->{'_cache'})