Branch Coverage

File:bin/dmarc-check-mail.pl
Coverage:75.0%

line%coveragebranch
60100TFunless &GetOptions("to|t=s", \$opt{'to'}, "from|f=s", \$opt{'from'}, "domain=s", \$opt{'domain'}, "selector=s", \$opt{'selector'}, "keyfile|k=s", \$opt{'keyfile'}, "sendmail=s", \$opt{'sendmail'}, "plain", \$opt{'plain'}, "dry-run|n", \$opt{'dry-run'}, "save=s", \$opt{'save'}, "help|h", sub {         usage(0); } )
62100TFunless $opt{'to'} and $opt{'from'}
66100TFif unusable_address($opt{'to'}) or unusable_address($opt{'from'})
75100TFif ($opt{'plain'}) { }
79100TFunless ($keyfile)
8150TF@candidates ? :
85100TFunless -r $keyfile
9050TFunless eval {         do {         require Mail::DKIM::Signer; require Mail::Send::DKIM; 1 } }
125100TF$opt{'plain'} ? :
127100TFif ($opt{'save'})
12850TFunless open my $fh, ">", $opt{'save'}
1300TFunless close $fh
134100TFif ($opt{'dry-run'})
140100TFunless open my $sendmail, "|-", $opt{'sendmail'}, "-t", "-f", $opt{'from'}
14350TFunless (close $sendmail)
17750TFif defined $signed
19250TF$ENV{'HOME'} ? :
50TF$ENV{'HOME'} ? :
50TF$ENV{'HOME'} ? :
197100TFunless -d $dir
19950TFunless $name =~ /\.(?:private|key|pem)\z/
21250TFif $key =~ /\Q$opt{'selector'}\E/ or $key =~ /\Q$opt{'domain'}\E/
224100TFif $address =~ /[\x00-\x20\x7f]/
225100TFif $address =~ /\A-/