Branch Coverage

blib/lib/CPAN/Testers/Data/Addresses.pm
Criterion Covered Total %
branch 117 200 58.5


line true false branch
82 2 7 if $$self{'fh'}
90 1 2 if ($$self{'options'}{'update'}) { }
1 1 elsif ($$self{'options'}{'reindex'}) { }
0 1 elsif ($$self{'options'}{'backup'}) { }
0 1 elsif ($$self{'options'}{'clean'}) { }
123 0 1 unless my $fh = 'IO::File'->new($$self{'options'}{'update'})
126 0 1 unless $_
129 0 1 unless ($address and $name || $display)
141 1 0 if ($testerid == 0)
143 1 0 if $pause
144 1 0 unless @rows
146 0 1 if (@rows) { }
154 1 0 if ($addressid == 0)
156 0 1 if (@rows) { }
167 0 1 unless $reportid and $guid and $fulldate
193 0 1 defined $$self{'options'}{'lastid'} ? :
197 24 9 if ($address{$$row{'tester'}}) { }
220 0 0 if $$row{'count'} <= 1
227 0 0 if ($addr{$$addr{'address'}}) { }
245 0 0 if ($$self{'backups'}{$driver}{'exists'}) { }
0 0 elsif ($driver =~ /(CSV|SQLite)/i) { }
262 0 0 if ($$self{'backups'}{'CSV'})
265 0 0 unless my $fh1 = 'IO::File'->new('addresses', 'r')
266 0 0 unless my $fh2 = 'IO::File'->new($$self{'backups'}{'CSV'}{'dbfile'}, 'w+')
279 9 0 if $$row{'name'}
280 9 0 if $$row{'pause'}
282 0 9 unless $$row{'email'}
286 0 9 unless $domain
290 0 2 if ($$self{'options'}{'verbose'})
300 9 0 if $$self{'parsed_map'}{$$row{'address'}}
304 0 2 unless my $fh = 'IO::File'->new($$self{'options'}{'mailrc'})
307 0 10 if /^$/
310 0 10 unless $alias
312 3 7 $$self{'address_map'}{$email} ? :
313 3 7 $$self{'address_map'}{$email} ? :
320 0 2 if ($$self{'options'}{'verbose'})
326 2 0 $$self{'options'}{'month'} ? :
329 0 2 if ($$self{'options'}{'verbose'})
338 12 54 $$self{'parsed_map'}{$$row[2]} ? :
339 12 54 $$self{'parsed_map'}{$$row[2]} ? :
340 0 54 $$self{'stored_map'}{$$row[2]} ? :
341 6 48 $$self{'address_map'}{$email} ? :
342 6 48 $$self{'address_map'}{$email} ? :
344 18 48 if $testerid and $addressid
357 0 2 if ($$self{'options'}{'verbose'})
381 0 14 unless ($email)
388 2 12 if $self->map_address($key, $local, $domain, $email)
395 4 16 if ($self->map_domain($key, $local, $domain2, $email))
402 4 8 if $last
403 0 8 if $self->map_name($key)
411 0 2 if ($$self{'result'}{'NOMAIL'})
422 6 2 if ($$self{'unparsed_map'}{$key}{'match'} and not $$self{'unparsed_map'}{$key}{'match'} =~ /SUGGESTION/) { }
440 0 2 unless $local and $domain
441 2 0 if ($domain) { }
452 2 6 if $$self{'unparsed_map'}{$_}{'match'}
473 0 2 if $$self{'options'}{'match'}
481 0 6 unless $key
503 1 17 if ($$self{'address_map'}{$key})
508 0 17 if ($$self{'address_map'}{$email})
513 7 10 if ($domain eq 'cpan.org')
514 3 4 if ($$self{'pause_map'}{$local})
520 1 13 if ($$self{'cpan_map'}{$email})
532 16 106 if $domain =~ /^$filter$/
535 6 17 if ($$self{'domain_map'}{$domain})
542 0 58 if ($map =~ /\b$domain$/)
550 1 56 if ($domain =~ /\b$map$/)
563 8 0 unless $name
564 6 2 unless $name
566 0 2 if ($$self{'named_map'}{$name})
571 0 2 if ($$self{'paused_map'}{$name})
589 2 6 unless (-f $f)
595 2 6 if ($id) { }
614 0 9 unless GetOptions $$self{'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'
648 0 9 if $$self{'options'}{'help'}
649 0 9 if $$self{'options'}{'version'}
651 0 9 unless $$self{'options'}{'config'}
652 0 9 unless -f $$self{'options'}{'config'}
660 0 9 unless $cfg->SectionExists($db)
663 0 9 unless $self->dbh
672 0 9 if $filters
673 0 9 if @filters
683 8 10 unless $$self{'options'}{$opt}
684 0 10 unless -f $$self{'options'}{$opt}
688 0 9 if ($$self{'options'}{'backup'})
689 0 0 unless $cfg->SectionExists('BACKUPS')
693 0 0 unless $cfg->SectionExists($driver)
697 0 0 $driver =~ /SQLite/i ? :
700 0 0 if ($driver =~ /CSV/i)
708 0 0 unless $$self{'backups'}{$driver}{'db'}
713 0 9 if $$self{'options'}{'lastid'}
721 2 7 if ($$self{'options'}{'output'})
722 2 0 if (my $fh = 'IO::File'->new($$self{'options'}{'output'}, 'w+'))
727 9 0 unless $$self{'options'}{'verbose'}
734 0 0 if $mess
736 0 0 if ($full)
786 22 4 if (my $fh = $$self{'fh'}) { }
795 0 45 unless my $log = $self->logfile
796 2 43 unless -f $log
798 1 44 $self->logclean ? :
804 0 45 unless my $fh = 'IO::File'->new($log, $mode)