]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/nntpd.t
t/*.t: localize $SIG{__WARN__} changes
[public-inbox.git] / t / nntpd.t
index 43b14d66389ab6544a38b22d453f33e7295f00f7..826e3f3da27c297a8c490593998045304f0009b6 100644 (file)
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -268,7 +268,7 @@ Date: Fri, 02 Oct 1993 00:00:00 +0000
                        $for_leafnode->header_set('Message-ID', @mids);
                        $for_leafnode->body_set('not-a-dupe');
                        my $warn = '';
-                       $SIG{__WARN__} = sub { $warn .= join('', @_) };
+                       local $SIG{__WARN__} = sub { $warn .= join('', @_) };
                        $im->add($for_leafnode);
                        $im->done;
                        like($warn, qr/reused/, 'warned for reused MID');