From: Jarkko Hietaniemi Date: Tue, 29 May 2001 12:34:53 +0000 (+0000) Subject: Additional safeguard against $@ getting trampled; idea from Hugo. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=886ba366bff0417d5808ffa0ed261811aefad502;p=p5sagit%2Fp5-mst-13.2.git Additional safeguard against $@ getting trampled; idea from Hugo. p4raw-id: //depot/perl@10279 --- diff --git a/lib/utf8_heavy.pl b/lib/utf8_heavy.pl index 7a70e29..3ac4ef9 100644 --- a/lib/utf8_heavy.pl +++ b/lib/utf8_heavy.pl @@ -34,11 +34,16 @@ sub SWASHNEW { } else { $file =~ s#^(Is|To)([A-Z].*)#$1/$2#; } - $list ||= ($caller ne 'main' && eval { $caller->$type(); }) - || do "$file.pl" - || do "$encoding/$file.pl" - || do "$encoding/Is/${type}.pl" - || croak("Can't find $encoding character property \"$type\""); + + { + local $@; + + $list ||= ($caller ne 'main' && eval { $caller->$type(); }) + || do "$file.pl" + || do "$encoding/$file.pl" + || do "$encoding/Is/${type}.pl" + || croak("Can't find $encoding character property \"$type\""); + } $| = 1;