From e0d76bd88d25e87f9d8f450f1c4e029812eacf02 Mon Sep 17 00:00:00 2001 From: Bryce Sanchez Date: Wed, 12 Jan 2011 16:53:21 +0000 Subject: [PATCH] Bug 5611 INIT block causes failure with mod perl Per module INIT Blocks are not run in mod_perl so their variables are not visible. A lexical var is adequate for this purpose Signed-off-by: Colin Campbell Signed-off-by: Chris Cormack --- C4/Scrubber.pm | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/C4/Scrubber.pm b/C4/Scrubber.pm index 80e08e57f5..d01795aa13 100644 --- a/C4/Scrubber.pm +++ b/C4/Scrubber.pm @@ -30,19 +30,18 @@ BEGIN { # @ISA = qw(HTML::Scrubber); } -INIT { - %scrubbertypes = ( - default => {}, # place holder, default settings are below as fallbacks in call to constructor - tag => {}, # uses defaults - comment => { - allow => [qw( br b i em big small strong )], - }, - staff => { - default => [ 1 =>{'*'=>1} ], - comment => 1, - }, - ); -} + +my %scrubbertypes = ( + default => {}, # place holder, default settings are below as fallbacks in call to constructor + tag => {}, # uses defaults + comment => { + allow => [qw( br b i em big small strong )], + }, + staff => { + default => [ 1 =>{'*'=>1} ], + comment => 1, + }, +); sub new { -- 2.39.5