Branch Coverage

blib/lib/CPAN/Testers/Data/Addresses.pm
Criterion Covered Total %
branch 142 206 68.9


line true false branch
83 6 7 if $$self{'fh'}
91 2 2 if ($$self{'options'}{'update'}) { }
1 1 elsif ($$self{'options'}{'reindex'}) { }
0 1 elsif ($$self{'options'}{'backup'}) { }
0 1 elsif ($$self{'options'}{'clean'}) { }
124 0 2 unless my $fh = 'IO::File'->new($$self{'options'}{'update'})
127 0 10 unless $_
130 3 7 unless ($address and $name || $display)
142 3 4 if ($testerid == 0)
144 3 0 if $pause
145 2 1 unless @rows
147 1 2 if (@rows) { }
155 3 4 if ($addressid == 0)
157 1 2 if (@rows) { }
168 2 4 unless $reportid and $guid and $fulldate
194 0 1 defined $$self{'options'}{'lastid'} ? :
198 24 9 if ($address{$$row{'tester'}}) { }
221 1 1 if $$row{'count'} <= 1
228 4 1 if ($addr{$$addr{'address'}}) { }
246 0 1 if ($$self{'backups'}{$driver}{'exists'}) { }
1 0 elsif ($driver =~ /(CSV|SQLite)/i) { }
263 0 1 if ($$self{'backups'}{'CSV'})
266 0 0 unless my $fh1 = 'IO::File'->new('addresses', 'r')
267 0 0 unless my $fh2 = 'IO::File'->new($$self{'backups'}{'CSV'}{'dbfile'}, 'w+')
280 9 0 if $$row{'name'}
281 9 0 if $$row{'pause'}
283 0 9 unless $$row{'email'}
287 0 9 unless $domain
291 0 2 if ($$self{'options'}{'verbose'})
301 9 0 if $$self{'parsed_map'}{$$row{'address'}}
305 0 2 unless my $fh = 'IO::File'->new($$self{'options'}{'mailrc'})
308 0 10 if /^$/
311 0 10 unless $alias
313 3 7 $$self{'address_map'}{$email} ? :
314 3 7 $$self{'address_map'}{$email} ? :
321 0 2 if ($$self{'options'}{'verbose'})
327 2 0 $$self{'options'}{'month'} ? :
330 0 2 if ($$self{'options'}{'verbose'})
339 12 54 $$self{'parsed_map'}{$$row[2]} ? :
340 12 54 $$self{'parsed_map'}{$$row[2]} ? :
341 0 54 $$self{'stored_map'}{$$row[2]} ? :
342 6 48 $$self{'address_map'}{$email} ? :
343 6 48 $$self{'address_map'}{$email} ? :
345 18 48 if $testerid and $addressid
358 0 2 if ($$self{'options'}{'verbose'})
382 0 14 unless ($email)
389 2 12 if $self->map_address($key, $local, $domain, $email)
396 4 16 if ($self->map_domain($key, $local, $domain2, $email))
403 4 8 if $last
404 0 8 if $self->map_name($key)
412 0 2 if ($$self{'result'}{'NOMAIL'})
423 6 2 if ($$self{'unparsed_map'}{$key}{'match'} and not $$self{'unparsed_map'}{$key}{'match'} =~ /SUGGESTION/) { }
441 0 2 unless $local and $domain
442 2 0 if ($domain) { }
453 2 6 if $$self{'unparsed_map'}{$_}{'match'}
474 0 2 if $$self{'options'}{'match'}
482 0 6 unless $key
504 1 17 if ($$self{'address_map'}{$key})
509 0 17 if ($$self{'address_map'}{$email})
514 7 10 if ($domain eq 'cpan.org')
515 3 4 if ($$self{'pause_map'}{$local})
521 1 13 if ($$self{'cpan_map'}{$email})
533 16 106 if $domain =~ /^$filter$/
536 6 17 if ($$self{'domain_map'}{$domain})
543 0 58 if ($map =~ /\b$domain$/)
551 1 57 if ($domain =~ /\b$map$/)
564 8 0 unless $name
565 6 2 unless $name
567 0 2 if ($$self{'named_map'}{$name})
572 0 2 if ($$self{'paused_map'}{$name})
590 2 6 unless (-f $f)
596 2 6 if ($id) { }
616 0 13 unless GetOptions \%options, 'config|c=s', 'update|u=s', 'clean', 'reindex|r', 'lastid|l=i', 'backup|b', 'mailrc|m=s', 'month=s', 'match', 'output=s', 'lastfile=s', 'logfile=s', 'logclean=i', 'verbose|v', 'help|h'
649 23 172 if $hash{$opt}
650 0 195 if $options{$opt}
653 0 13 if $$self{'options'}{'help'}
654 0 13 if $$self{'options'}{'version'}
656 0 13 unless $$self{'options'}{'config'}
657 0 13 unless -f $$self{'options'}{'config'}
665 0 13 unless $cfg->SectionExists($db)
668 0 13 unless $self->dbh
677 0 13 if $filters
678 0 13 if @filters
688 11 15 unless $$self{'options'}{$opt}
689 0 15 unless -f $$self{'options'}{$opt}
693 0 13 if $$self{'options'}{'lastid'}
701 1 12 if ($$self{'options'}{'backup'})
702 0 1 unless $cfg->SectionExists('BACKUPS')
709 0 3 unless $cfg->SectionExists($driver)
712 2 1 unless ($DRIVERS_DBI{$driver})
719 1 0 $driver =~ /SQLite/i ? :
722 0 1 if ($driver =~ /CSV/i)
730 0 1 unless $$self{'backups'}{$driver}{'db'}
735 6 7 if ($$self{'options'}{'output'})
736 6 0 if (my $fh = 'IO::File'->new($$self{'options'}{'output'}, 'w+'))
741 13 0 unless $$self{'options'}{'verbose'}
748 0 0 if $mess
750 0 0 if ($full)
800 26 4 if (my $fh = $$self{'fh'}) { }
809 0 74 unless my $log = $self->logfile
810 2 72 unless -f $log
812 1 73 $self->logclean ? :
818 0 74 unless my $fh = 'IO::File'->new($log, $mode)