Bug 5611 INIT block causes failure with mod perl
authorBryce Sanchez <brice.sanchez@sys-tech.net>
Wed, 12 Jan 2011 16:53:21 +0000 (16:53 +0000)
committerChris Nighswonger <chris.nighswonger@gmail.com>
Wed, 12 Jan 2011 18:42:21 +0000 (13:42 -0500)
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 <colin.campbell@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit e0d76bd88d25e87f9d8f450f1c4e029812eacf02)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
C4/Scrubber.pm

index 80e08e5..d01795a 100644 (file)
@@ -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 {