diff options
author | Eric Wong <e@yhbt.net> | 2020-04-18 03:38:50 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-04-19 08:51:24 +0000 |
commit | a479b45117ed69d9311770fa39e6676d38f9cab2 (patch) | |
tree | 9262dbdd0147b02a7d9d9a797271ec25e8aa1c5f /scripts/ssoma-replay | |
parent | a014723b600e35cd495f048c89611e611436a15e (diff) | |
download | public-inbox-a479b45117ed69d9311770fa39e6676d38f9cab2.tar.gz |
I did not know to use the return value of `do' back in the day. There's probably no practical difference in these cases, but `eval' is overkill for these uses and may hide actual errors. We can get rid of a few redundant `scalar' ops and pass scalar refs to Email::MIME->new to avoid copies in a few more places, too.
Diffstat (limited to 'scripts/ssoma-replay')
-rwxr-xr-x | scripts/ssoma-replay | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/scripts/ssoma-replay b/scripts/ssoma-replay index 3e928084..07121423 100755 --- a/scripts/ssoma-replay +++ b/scripts/ssoma-replay @@ -30,10 +30,7 @@ use Email::Simple; use URI::Escape qw/uri_escape_utf8/; use File::Temp qw/tempfile/; my ($fh, $filename) = tempfile('ssoma-replay-XXXXXXXX', TMPDIR => 1); -my $msg = eval { - local $/; - Email::Simple->new(<STDIN>); -}; +my $msg = Email::Simple->new(do { local $/; <STDIN> }); select $fh; # Note: the archive URL makes assumptions about where the |