Doc nits
[p5sagit/p5-mst-13.2.git] / lib / legacy.pm
index 3ffea69..eaab5d5 100755 (executable)
@@ -2,7 +2,7 @@ package legacy;
 
 our $VERSION = '1.00';
 
-$unicode8bit::hint_uni8bit = 0x00000800;
+$unicode8bit::hint_not_uni8bit = 0x00000800;
 
 my %legacy_bundle = (
     "5.10" => [qw(unicode8bit)],
@@ -13,8 +13,7 @@ my %legacy = ( 'unicode8bit' => '0' );
 
 =head1 NAME
 
-legacy - Perl pragma to preserve legacy behaviors or enable new non-default
-behaviors
+legacy - Perl pragma to preserve legacy behaviors or enable new non-default behaviors
 
 =head1 SYNOPSIS
 
@@ -51,8 +50,6 @@ The one current possibility is:
 
 =head3 unicode8bit
 
-THIS IS SUBJECT TO CHANGE
-
 Use legacy semantics for the 128 characters on ASCII systems that have the 8th
 bit set.  (See L</EBCDIC platforms> below for EBCDIC systems.)  Unless
 C<S<use locale>> is specified, or the scalar containing such a character is
@@ -63,9 +60,9 @@ anything.
 
 This behavior stems from when Perl did not support Unicode, and ASCII was the
 only known character set outside of C<S<use locale>>.  In order to not
-possibly break pre_Unicode programs, these characters have retained their old
+possibly break pre-Unicode programs, these characters have retained their old
 non-meanings, except when it is clear to Perl that Unicode is what is meant,
-for example by calling utf::upgrade() on a scalar, or if the scalar also
+for example by calling utf8::upgrade() on a scalar, or if the scalar also
 contains characters that are only available in Unicode.  Then these 128
 characters take on their Unicode meanings.
 
@@ -78,22 +75,21 @@ The behavior is known to have effects on these areas:
 
 =over 4
 
-=item
+=item *
 
-Changing the case of a scalar, that is, using C<uc()>,
-C<ucfirst()>,
-C<lc()>,
-and C<lcfirst()>, or C<\L>, C<\U>, C<\u> and C<\l> in regular expression substitutions.
+Changing the case of a scalar, that is, using C<uc()>, C<ucfirst()>, C<lc()>,
+and C<lcfirst()>, or C<\L>, C<\U>, C<\u> and C<\l> in regular expression
+substitutions.
 
-=item
+=item *
 
 Using caseless (C</i>) regular expression matching
 
-=item
+=item *
 
 Matching a number of properties in regular expressions, such as C<\w>
 
-=item
+=item *
 
 User-defined case change mappings.  You can create a C<ToUpper()> function, for
 example, which overrides Perl's built-in case mappings.  The scalar must be
@@ -134,7 +130,7 @@ a colon, to distinguish it from an individual legacy behavior.
 Specifying sub-versions such as the C<0> in C<5.10.0> in legacy bundles has
 no effect: legacy bundles are guaranteed to be the same for all sub-versions.
 
-Legacy bundles are not allowed with C<no legacy>
+Legacy bundles are not allowed with C<no legacy>.
 
 =cut
 
@@ -159,7 +155,7 @@ sub import {
         if (!exists $legacy{$name}) {
             unknown_legacy($name);
         }
-        $^H &= ~$unicode8bit::hint_uni8bit;    # The only valid thing as of yet
+        $^H |= $unicode8bit::hint_not_uni8bit;   # The only valid thing as of yet
     }
 }
 
@@ -182,7 +178,7 @@ sub unimport {
             unknown_legacy($name);
         }
         else {
-            $^H |= $unicode8bit::hint_uni8bit; # The only valid thing as of yet
+            $^H &= ~ $unicode8bit::hint_not_uni8bit; # The only valid thing now
         }
     }
 }