]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/v2reindex.t
favor `do {}' over `eval {}' for localized slurp
[public-inbox.git] / t / v2reindex.t
index 990513a3ac07d024d4d1742a864aaa81105ef2c9..b6164ff810febd2936236e7ac2bd42f0d2e3bdc8 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2019 all contributors <meta@public-inbox.org>
+# Copyright (C) 2018-2020 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use warnings;
@@ -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 => [