]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/watch_maildir_v2.t
favor `do {}' over `eval {}' for localized slurp
[public-inbox.git] / t / watch_maildir_v2.t
index db407f78e2e95d9fae7a16df20c66a9d75d7648b..685cd6edc2644c50e276fd46ed2714d3f3b01575 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 Test::More;
@@ -125,7 +125,7 @@ More majordomo info at  http://vger.kernel.org/majordomo-info.html\n);
 {
        my $patch = 't/data/0001.patch';
        open my $fh, '<', $patch or die "failed to open $patch: $!\n";
-       $msg = eval { local $/; <$fh> };
+       $msg = do { local $/; <$fh> };
        PublicInbox::Emergency->new($maildir)->prepare(\$msg);
        PublicInbox::WatchMaildir->new($config)->scan('full');
        my ($nr, $msgs) = $srch->reopen->query('dfpost:6e006fd7');