summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-05-29 12:34:53 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-05-29 12:34:53 +0000
commitb65c8e03ceadc7114a403d8c032d89f35ad1d883 (patch)
treef63b9863f164d070589f6fbdeed4a97ba2321140 /lib
parent3e472c20d5588a5556f767e915899545a8a310c3 (diff)
downloadperl-b65c8e03ceadc7114a403d8c032d89f35ad1d883.tar.gz
Additional safeguard against $@ getting trampled; idea from Hugo.
p4raw-id: //depot/perl@10279
Diffstat (limited to 'lib')
-rw-r--r--lib/utf8_heavy.pl15
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;