This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Unicode/UCD.pm: Fix undef bug
authorKarl Williamson <public@khwilliamson.com>
Mon, 25 Feb 2013 20:35:34 +0000 (13:35 -0700)
committerKarl Williamson <public@khwilliamson.com>
Mon, 25 Feb 2013 21:57:49 +0000 (14:57 -0700)
This only happens should Perl be compiled on the very first Unicode
release, which is extremely unlikely, but fix it anyway.

lib/Unicode/UCD.pm

index a99f356..9c3dd7c 100644 (file)
@@ -5,7 +5,7 @@ use warnings;
 no warnings 'surrogate';    # surrogates can be inputs to this
 use charnames ();
 
-our $VERSION = '0.50';
+our $VERSION = '0.51';
 
 require Exporter;
 
@@ -617,7 +617,7 @@ sub _charblocks {
         if ($v_unicode_version lt v2.0.0) {
             my $subrange = [ 0, 0x10FFFF, 'No_Block' ];
             push @BLOCKS, $subrange;
-            push @{$BLOCKS{$3}}, $subrange;
+            push @{$BLOCKS{'No_Block'}}, $subrange;
         }
         elsif (openunicode(\$BLOCKSFH, "Blocks.txt")) {
            local $_;