From 0d74c05d6405b41e6296ed2cbe634f46c9aa597d Mon Sep 17 00:00:00 2001 From: Kyle Hall Date: Tue, 7 Feb 2023 06:49:28 -0500 Subject: [PATCH] Bug 32612: (QA follow-up) Add BINMODE method to C4::SIP::Trapper The module Log::Log4perl::Appender::Screen is attempting to change binmode during unit tests for SIPServer and is failing because of our tie in SIPServer.pm for reasons unknown. This patch implements the perltie method TIEHANDLE which allows the binmode to be handled in the C4::SIP::Trapper package. Signed-off-by: Tomas Cohen Arazi (cherry picked from commit d00d07cae751986a220d114ff165cbf5206a0283) Signed-off-by: Martin Renvoize (cherry picked from commit 015ad1f7a7772da3787eb88266ea550793d39ea4) Signed-off-by: Lucas Gass --- C4/SIP/Trapper.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/C4/SIP/Trapper.pm b/C4/SIP/Trapper.pm index 8f115b59b7..6feaf3ec56 100644 --- a/C4/SIP/Trapper.pm +++ b/C4/SIP/Trapper.pm @@ -35,4 +35,10 @@ sub PRINT { $Log::Log4perl::caller_depth--; } +# Supress errors from Log::Log4perl::Appender::Screen +sub BINMODE { + my ( $self, $mode ) = @_; + binmode( STDOUT, $mode ); +}; + 1; -- 2.39.5