Web-VWF
view release on metacpan or search on metacpan
is(length(slurp($output)), $length, 'a second close does not send again');
};
subtest 'signed when configured' => sub {
plan skip_all => 'Mail::DKIM and Crypt::OpenSSL::RSA are needed to sign' unless($have_dkim && $have_crypto);
# A key per run: no private key belongs in the distribution, not even a
# throwaway one, because the next reader cannot tell that it is throwaway.
my $keyfile = File::Spec->catfile($dir, 'test.private');
open(my $fh, '>', $keyfile) or die "Cannot write $keyfile: $!";
print $fh Crypt::OpenSSL::RSA->generate_key(1024)->get_private_key_string();
close($fh) or die "Cannot close $keyfile: $!";
my ($program, $output) = capture('signed');
my $mail = Web::VWF::Mail->new(
from => 'no-reply@example.com',
domain => 'example.com',
selector => '202611',
keyfile => $keyfile,
sendmail => $program,
( run in 1.855 second using v1.01-cache-2.11-cpan-8379b9b8ec2 )