This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
mktables: Correct Unicode 6.1 omission
[perl5.git] / lib / unicore / mktables
index 6fea440..3c8e4d9 100644 (file)
@@ -11613,6 +11613,10 @@ sub  filter_script_extensions_line {
     # 064B..0655    ; Arab Syrc # Mn  [11] ARABIC FATHATAN..ARABIC HAMZA BELOW
 
     my @fields = split /\s*;\s*/;
+
+    # This script was erroneously omitted in this Unicode version.
+    $fields[1] .= ' Takr' if $v_version eq v6.1.0 && $fields[0] =~ /^0964/;
+
     my @full_names;
     foreach my $short_name (split " ", $fields[1]) {
         push @full_names, $script->table($short_name)->full_name;
@@ -12698,6 +12702,31 @@ END
         $unassigned->set_equivalent_to($age_default, Related => 1);
     }
 
+    # See L<perlfunc/quotemeta>
+    my $quotemeta = $perl->add_match_table('_Perl_Quotemeta',
+                                           Perl_Extension => 1,
+                                           Fate => $INTERNAL_ONLY,
+
+                                           # Initialize to what's common in
+                                           # all Unicode releases.
+                                           Initialize =>
+                                                $Space
+                                                + $gc->table('Control')
+                           );
+
+    # In early releases without the proper Unicode properties, just set to \W.
+    if (! defined (my $patsyn = property_ref('Pattern_Syntax'))
+        || ! defined (my $patws = property_ref('Pattern_White_Space'))
+        || ! defined (my $di = property_ref('Default_Ignorable_Code_Point')))
+    {
+        $quotemeta += ~ $Word;
+    }
+    else {
+        $quotemeta += $patsyn->table('Y')
+                   + $patws->table('Y')
+                   + $di->table('Y')
+                   + ((~ $Word) & $ASCII);
+    }
 
     # Finished creating all the perl properties.  All non-internal non-string
     # ones have a synonym of 'Is_' prefixed.  (Internal properties begin with