From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id D45961F56F for ; Sun, 1 Oct 2023 02:43:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1696128205; bh=xilMvbYNZJz+5QS2giNxlrF3tiIC092yTsC4c6D54L8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Duxh7BUa0Txm7NmsNtvknbWuXKr+jTWxeN0hQL8QaIXXZQ8sIghk/IaEV6wU1WrGy +vw0AREh93xtjz/x1LTHrTSOgNy0VzJu9eetGM06fdkuGXGsnZhMvvqz55HcwE6/eh UkAHjeFATAlOx6GyUoYllAzFzRfcsJPW3pIttLuk= From: Eric Wong To: spew@80x24.org Subject: [PATCH 13/16] lei rediff: perl -e instead of -E Date: Sun, 1 Oct 2023 02:43:20 +0000 Message-ID: <20231001024323.1960491-13-e@80x24.org> In-Reply-To: <20231001024323.1960491-1-e@80x24.org> References: <20231001024323.1960491-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: --- lib/PublicInbox/LeiRediff.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/LeiRediff.pm b/lib/PublicInbox/LeiRediff.pm index 6cc6131b..a886931c 100644 --- a/lib/PublicInbox/LeiRediff.pm +++ b/lib/PublicInbox/LeiRediff.pm @@ -140,7 +140,7 @@ EOM sub wait_requote { # OnDestroy callback my ($lei, $pid, $old_1) = @_; - $lei->{1} = $old_1; # closes stdin of `perl -pE 's/^/> /'` + $lei->{1} = $old_1; # closes stdin of `perl -pe 's/^/> /'` waitpid($pid, 0) == $pid or die "BUG(?) waitpid: \$!=$! \$?=$?"; $lei->child_error($?) if $?; } @@ -150,7 +150,7 @@ sub requote ($$) { my $old_1 = $lei->{1}; my $opt = { 1 => $old_1, 2 => $lei->{2} }; # $^X (perl) is overkill, but maybe there's a weird system w/o sed - my ($w, $pid) = popen_wr([$^X, '-pE', "s/^/$pfx/"], $lei->{env}, $opt); + my ($w, $pid) = popen_wr([$^X, '-pe', "s/^/$pfx/"], $lei->{env}, $opt); $w->autoflush(1); binmode $w, ':utf8'; # incompatible with ProcessPipe due to syswrite $lei->{1} = $w;