diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-29 12:34:53 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-29 12:34:53 +0000 |
commit | 886ba366bff0417d5808ffa0ed261811aefad502 (patch) | |
tree | f63b9863f164d070589f6fbdeed4a97ba2321140 /lib/utf8_heavy.pl | |
parent | 081e4e8ae6719b3a129e78ce5bbd1f8db2638dcc (diff) | |
download | perl-886ba366bff0417d5808ffa0ed261811aefad502.tar.gz |
Additional safeguard against $@ getting trampled; idea from Hugo.
p4raw-id: //depot/perl@10279
Diffstat (limited to 'lib/utf8_heavy.pl')
-rw-r--r-- | lib/utf8_heavy.pl | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/utf8_heavy.pl b/lib/utf8_heavy.pl index 7a70e29c25..3ac4ef9b59 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; |