summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-11-05 23:51:06 -0700
committerFather Chrysostomos <sprout@cpan.org>2010-11-05 23:51:06 -0700
commit1363cbd099d4724e4aef1fe278b71abc057d23cc (patch)
treef7f0070bab61a0997b3bfd527dfdb48987530681 /lib
parentb18bd085f437e451edf1cca6f3804fe5c9c4bf27 (diff)
downloadperl-1363cbd099d4724e4aef1fe278b71abc057d23cc.tar.gz
Avoid a run-time miniperl check every time SWASHNEW is called
Diffstat (limited to 'lib')
-rw-r--r--lib/utf8_heavy.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/utf8_heavy.pl b/lib/utf8_heavy.pl
index 56cfe059c2..7951bc8565 100644
--- a/lib/utf8_heavy.pl
+++ b/lib/utf8_heavy.pl
@@ -100,13 +100,19 @@ sub croak { require Carp; Carp::croak(@_) }
# keep going, but return an empty table so only what the code
# has compiled in internally (currently ASCII/Latin1 range
# matching) will work.
- if (! defined &DynaLoader::boot_DynaLoader) {
+ BEGIN {
+ # Poor man's constant, to avoid a run-time check.
+ $utf8::{miniperl}
+ = \! defined &DynaLoader::boot_DynaLoader;
+ }
+ if (miniperl) {
eval "require '$unicore_dir/Heavy.pl'";
last GETFILE if $@;
}
else {
require "$unicore_dir/Heavy.pl";
}
+ BEGIN { delete $utf8::{miniperl} }
# Everything is caseless matching
my $property_and_table = lc $type;