about summary refs log tree commit homepage
path: root/t/v2reindex.t
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-04-18 03:38:50 +0000
committerEric Wong <e@yhbt.net>2020-04-19 08:51:24 +0000
commita479b45117ed69d9311770fa39e6676d38f9cab2 (patch)
tree9262dbdd0147b02a7d9d9a797271ec25e8aa1c5f /t/v2reindex.t
parenta014723b600e35cd495f048c89611e611436a15e (diff)
downloadpublic-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 't/v2reindex.t')
-rw-r--r--t/v2reindex.t3
1 files changed, 1 insertions, 2 deletions
diff --git a/t/v2reindex.t b/t/v2reindex.t
index 7c14117a..b6164ff8 100644
--- a/t/v2reindex.t
+++ b/t/v2reindex.t
@@ -18,12 +18,11 @@ my $ibx_config = {
         -primary_address => 'test@example.com',
         indexlevel => 'full',
 };
-my $agpl = eval {
+my $agpl = do {
         open my $fh, '<', 'COPYING' or die "can't open COPYING: $!";
         local $/;
         <$fh>;
 };
-$agpl or die "AGPL or die :P\n";
 my $phrase = q("defending all users' freedom");
 my $mime = PublicInbox::MIME->create(
         header => [