From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 641C01FA00 for ; Thu, 25 Feb 2021 10:11:07 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 3/4] test_common: io_modes: always support read/write Date: Thu, 25 Feb 2021 10:11:05 +0000 Message-Id: <20210225101106.12505-4-e@80x24.org> In-Reply-To: <20210225101106.12505-1-e@80x24.org> References: <20210225101106.12505-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This avoids warnings when redirecting STDIN to a scalarref via run_script(). --- lib/PublicInbox/TestCommon.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm index fc32b57f..af1b2e4f 100644 --- a/lib/PublicInbox/TestCommon.pm +++ b/lib/PublicInbox/TestCommon.pm @@ -155,8 +155,8 @@ sub key2script ($) { 'blib/script/'.$key; } -my @io_mode = ([ *STDIN{IO}, '<&' ], [ *STDOUT{IO}, '>&' ], - [ *STDERR{IO}, '>&' ]); +my @io_mode = ([ *STDIN{IO}, '+<&' ], [ *STDOUT{IO}, '+>&' ], + [ *STDERR{IO}, '+>&' ]); sub _prepare_redirects ($) { my ($fhref) = @_;