From 06bc2468ba194717cd503ea557ec6e647e3af081 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 22 Jul 2009 09:08:39 -0500 Subject: [PATCH] check $debug to print debug info only when wanted Signed-off-by: Galen Charlton --- C4/SIP/ILS/Patron.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/SIP/ILS/Patron.pm b/C4/SIP/ILS/Patron.pm index abdb7e925f..d3f6de8d16 100644 --- a/C4/SIP/ILS/Patron.pm +++ b/C4/SIP/ILS/Patron.pm @@ -95,7 +95,7 @@ sub new { inet => ( !$debarred ), ); } - print STDERR "patron fines: $ilspatron{fines} ... amountoutstanding: $kp->{amountoutstanding} ... CHARGES->amount: $flags->{CHARGES}->{amount}\n"; + $debug and warn "patron fines: $ilspatron{fines} ... amountoutstanding: $kp->{amountoutstanding} ... CHARGES->amount: $flags->{CHARGES}->{amount}"; for (qw(CHARGES CREDITS GNA LOST DBARRED NOTES)) { ($flags->{$_}) or next; $ilspatron{screen_msg} .= ($flags->{$_}->{message} || '') ; -- 2.39.5