Localize $@ and $! before loading a file in SWASHNEW
Rafael Garcia-Suarez [Wed, 16 Sep 2009 07:43:51 +0000 (09:43 +0200)]
This fixes a bug where a spurious error was reported from utf8_heavy.
This been found by Salvador Ortiz Garcia who suggested to localize $@;
I merely added $!.

lib/utf8_heavy.pl

index ecdd95e..41a0662 100644 (file)
@@ -197,6 +197,8 @@ sub SWASHNEW {
                return $found;
            }
 
+           local $@;
+           local $!;
            $list = do $file; die $@ if $@;
        }