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 24F231F47D for ; Mon, 27 Feb 2023 07:18:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1677482314; bh=R0ok3qtRufZsFgy9xEOlEKwDFOWb3DuAp8uen1Xd3eg=; h=From:To:Subject:Date:From; b=3xI2xwSCUVKXj6Es1nIcvuhUXdOClS2iku3yKPjZmDnOL9NnAN3chbeOdQOyHmYa/ rea9VtFhYPjA/elY1NvPzdtsWX7fc5MUYdKgcSCllvxRFfXqMfXNPfqYFo1lcc8Kif SXpgEkdsbViuUEtx0wAe89QCJ5SRl6zy5OWhkViM= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] process_pipe: BINMODE: pass LAYER argument Date: Mon, 27 Feb 2023 07:18:34 +0000 Message-Id: <20230227071834.3320195-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We'll end up using this to handle `:utf8', probably. --- lib/PublicInbox/ProcessPipe.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/ProcessPipe.pm b/lib/PublicInbox/ProcessPipe.pm index 1bc792c4..bbba75a2 100644 --- a/lib/PublicInbox/ProcessPipe.pm +++ b/lib/PublicInbox/ProcessPipe.pm @@ -24,7 +24,11 @@ sub TIEHANDLE { $self; } -sub BINMODE { binmode(shift->{fh}) } # for IO::Uncompress::Gunzip +# for IO::Uncompress::Gunzip +sub BINMODE { + my $self = shift; + binmode($self->{fh}, @_); +} sub READ { read($_[0]->{fh}, $_[1], $_[2], $_[3] || 0) }