From d00d07cae751986a220d114ff165cbf5206a0283 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 --- 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