From: Rafael Garcia-Suarez Date: Wed, 16 Sep 2009 07:43:51 +0000 (+0200) Subject: Localize $@ and $! before loading a file in SWASHNEW X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2096afc47576baa623939e9e084b606dc97f60d8;p=p5sagit%2Fp5-mst-13.2.git Localize $@ and $! before loading a file in SWASHNEW 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 $!. --- diff --git a/lib/utf8_heavy.pl b/lib/utf8_heavy.pl index ecdd95e..41a0662 100644 --- a/lib/utf8_heavy.pl +++ b/lib/utf8_heavy.pl @@ -197,6 +197,8 @@ sub SWASHNEW { return $found; } + local $@; + local $!; $list = do $file; die $@ if $@; }