pod updates (from David Adler, M J T Guy)
[p5sagit/p5-mst-13.2.git] / pod / perlvar.pod
index a43ab60..dca9cc0 100644 (file)
@@ -686,6 +686,8 @@ of perl in the right bracket?)  Example:
 See also the documentation of C<use VERSION> and C<require VERSION>
 for a convenient way to fail if the running Perl interpreter is too old.
 
+See C<$^V> for a more modern representation of the Perl version.
+
 =item $COMPILING
 
 =item $^C
@@ -830,6 +832,23 @@ Keep info about source lines on which a subroutine is defined.
 
 Start with single-step on.
 
+=item 0x40
+
+Use subroutine address instead of name when reporting.
+
+=item 0x80
+
+Report C<goto &subroutine> as well.
+
+=item 0x100
+
+Provide informative "file" names for evals based on the place they were compiled.
+
+=item 0x200
+
+Provide informative names to anonymous subroutines based on the place they
+were compiled.
+
 =back
 
 Some bits may be relevant at compile-time only, some at
@@ -854,6 +873,61 @@ The time at which the program began running, in seconds since the
 epoch (beginning of 1970).  The values returned by the B<-M>, B<-A>,
 and B<-C> filetests are based on this value.
 
+=item $^U
+
+Global flag that switches on Unicode character support in the Perl
+interpreter.  The initial value is usually C<0> for compatibility
+with Perl versions earlier than 5.6, but may be automatically set
+to C<1> by Perl if the system provides a user-settable default
+(e.g., C<$ENV{LC_CTYPE}>).  It is also implicitly set to C<1>
+whenever the utf8 pragma is loaded.
+
+Setting it to C<1> has the following effects:
+
+=over
+
+=item *
+
+C<chr> produces UTF-8 encoded Unicode characters.  These are the same
+as the corresponding ASCII characters if the argument is less than 128.
+
+=item *
+
+The C<%c> format in C<sprintf> generates a UTF-8 encoded Unicode
+character.  This is the same as the corresponding ASCII character
+if the argument is less than 128.
+
+=item *
+
+Any system calls made by Perl will use wide character APIs native to
+the system, if available.  This is currently only implemented on the
+Windows platform.
+
+=back
+
+The C<byte> pragma overrides the value of this flag in the current
+lexical scope.  See L<byte>.
+
+=item $^V
+
+The revision, version, and subversion of the Perl interpreter, represented
+as a "version tuple".  Version tuples have both a numeric value and a
+string value.  The numeric value is a floating point number that amounts
+to revision + version/1000 + subversion/1000000, and the string value
+is made of utf8 characters:
+C<chr($revision) . chr($version) . chr($subversion)>.
+
+This can be used to determine whether the Perl interpreter executing a
+script is in the right range of versions.  (Mnemonic: use ^V for Version
+control.)  Example:
+
+    warn "No "our" declarations!\n" if $^V and $^V lt v5.6;
+
+See also the documentation of C<use VERSION> and C<require VERSION>
+for a convenient way to fail if the running Perl interpreter is too old.
+
+See also C<$]> for an older representation of the Perl version.
+
 =item $WARNING
 
 =item $^W