Branch Coverage

blib/lib/CPAN/Testers/Data/Addresses.pm
Criterion Covered Total %
branch 152 206 73.7


line true false branch
83 6 12 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 16 0 if $$row{'name'}
281 16 0 if $$row{'pause'}
283 0 16 unless $$row{'email'}
287 0 16 unless $domain
291 0 3 if ($$self{'options'}{'verbose'})
301 16 10 if $$self{'parsed_map'}{$$row{'address'}}
305 0 3 unless my $fh = 'IO::File'->new($$self{'options'}{'mailrc'})
308 0 15 if /^$/
311 0 15 unless $alias
313 5 10 $$self{'address_map'}{$email} ? :
314 5 10 $$self{'address_map'}{$email} ? :
321 0 3 if ($$self{'options'}{'verbose'})
327 3 0 $$self{'options'}{'month'} ? :
330 0 3 if ($$self{'options'}{'verbose'})
339 12 58 $$self{'parsed_map'}{$$row[2]} ? :
340 12 58 $$self{'parsed_map'}{$$row[2]} ? :
341 0 58 $$self{'stored_map'}{$$row[2]} ? :
342 6 52 $$self{'address_map'}{$email} ? :
343 6 52 $$self{'address_map'}{$email} ? :
345 18 52 if $testerid and $addressid
358 0 3 if ($$self{'options'}{'verbose'})
382 0 18 unless ($email)
389 2 16 if $self->map_address($key, $local, $domain, $email)
396 5 19 if ($self->map_domain($key, $local, $domain2, $email))
403 5 11 if $last
404 0 11 if $self->map_name($key)
412 0 3 if ($$self{'result'}{'NOMAIL'})
423 7 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 9 if $$self{'unparsed_map'}{$_}{'match'}
474 0 3 if $$self{'options'}{'match'}
482 0 9 unless $key
504 1 21 if ($$self{'address_map'}{$key})
509 0 21 if ($$self{'address_map'}{$email})
514 7 14 if ($domain eq 'cpan.org')
515 3 4 if ($$self{'pause_map'}{$local})
521 1 17 if ($$self{'cpan_map'}{$email})
533 16 106 if $domain =~ /^$filter$/
536 7 20 if ($$self{'domain_map'}{$domain})
543 0 73 if ($map =~ /\b$domain$/)
551 1 72 if ($domain =~ /\b$map$/)
564 11 0 unless $name
565 9 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 18 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', 'version', 'help|h'
650 29 259 if $hash{$opt}
651 1 287 if $options{$opt}
654 2 16 if $$self{'options'}{'help'}
655 1 15 if $$self{'options'}{'version'}
657 1 14 unless $$self{'options'}{'config'}
658 1 13 unless -f $$self{'options'}{'config'}
666 0 13 unless $cfg->SectionExists($db)
669 0 13 unless $self->dbh
678 0 13 if $filters
679 0 13 if @filters
689 11 15 unless $$self{'options'}{$opt}
690 0 15 unless -f $$self{'options'}{$opt}
694 0 13 if $$self{'options'}{'lastid'}
702 1 12 if ($$self{'options'}{'backup'})
703 0 1 unless $cfg->SectionExists('BACKUPS')
710 0 3 unless $cfg->SectionExists($driver)
713 2 1 unless ($DRIVERS_DBI{$driver})
720 1 0 $driver =~ /SQLite/i ? :
723 0 1 if ($driver =~ /CSV/i)
731 0 1 unless $$self{'backups'}{$driver}{'db'}
736 6 7 if ($$self{'options'}{'output'})
737 6 0 if (my $fh = 'IO::File'->new($$self{'options'}{'output'}, 'w+'))
742 13 0 unless $$self{'options'}{'verbose'}
749 2 3 if $mess
751 4 1 if ($full)
802 34 4 if (my $fh = $$self{'fh'}) { }
811 0 74 unless my $log = $self->logfile
812 2 72 unless -f $log
814 1 73 $self->logclean ? :
820 0 74 unless my $fh = 'IO::File'->new($log, $mode)