This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Configure: signbit scan assuming too much
[perl5.git] / pod / perlvar.pod
index f825754..35351b7 100644 (file)
@@ -464,9 +464,12 @@ version objects) and numeric comparisons can occasionally fail; it's good
 for string literal version checks and bad for comparing to a variable
 that hasn't been sanity-checked.
 
 for string literal version checks and bad for comparing to a variable
 that hasn't been sanity-checked.
 
-Mnemonic: Is this version of perl in the right bracket?
+The C<$OLD_PERL_VERSION> form was added in Perl v5.20.0 for historical
+reasons but its use is discouraged. (If your reason to use C<$]> is to
+run code on old perls then referring to it as C<$OLD_PERL_VERSION> would
+be self-defeating.)
 
 
-The C<$OLD_PERL_VERSION> form was added in Perl v5.20.0.
+Mnemonic: Is this version of perl in the right bracket?
 
 =item $SYSTEM_FD_MAX
 
 
 =item $SYSTEM_FD_MAX
 
@@ -712,13 +715,14 @@ conversion, which works for both v-strings or version objects:
 See 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 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 a decimal representation of the Perl version.
+See also C<L</$]>> for a decimal representation of the Perl version.
 
 The main advantage of C<$^V> over C<$]> is that, for Perl v5.10.0 or
 later, it overloads operators, allowing easy comparison against other
 version representations (e.g. decimal, literal v-string, "v1.2.3", or
 objects).  The disadvantage is that prior to v5.10.0, it was only a
 
 The main advantage of C<$^V> over C<$]> is that, for Perl v5.10.0 or
 later, it overloads operators, allowing easy comparison against other
 version representations (e.g. decimal, literal v-string, "v1.2.3", or
 objects).  The disadvantage is that prior to v5.10.0, it was only a
-literal v-string, which can't be easily printed or compared.
+literal v-string, which can't be easily printed or compared, whereas
+the behavior of C<$]> is unchanged on all versions of Perl.
 
 Mnemonic: use ^V for a version object.
 
 
 Mnemonic: use ^V for a version object.
 
@@ -1132,10 +1136,8 @@ After a match against some variable C<$var>:
 
 This variable was added in Perl v5.6.0.
 
 
 This variable was added in Perl v5.6.0.
 
-=item %LAST_MATCH_START
-
 =item %-
 =item %-
-X<%-> X<%LAST_MATCH_START>
+X<%->
 
 Similar to C<%+>, this variable allows access to the named capture groups
 in the last successful match in the currently active dynamic scope.  To
 
 Similar to C<%+>, this variable allows access to the named capture groups
 in the last successful match in the currently active dynamic scope.  To
@@ -1666,12 +1668,12 @@ Under a few operating systems, C<$^E> may contain a more verbose error
 indicator, such as in this case, "CDROM tray not closed."  Systems that
 do not support extended error messages leave C<$^E> the same as C<$!>.
 
 indicator, such as in this case, "CDROM tray not closed."  Systems that
 do not support extended error messages leave C<$^E> the same as C<$!>.
 
-Finally, C<$?> may be set to non-0 value if the external program
+Finally, C<$?> may be set to non-0 value if the external program
 F</cdrom/install> fails.  The upper eight bits reflect specific error
 conditions encountered by the program (the program's C<exit()> value).
 The lower eight bits reflect mode of failure, like signal death and
 core dump information.  See L<wait(2)> for details.  In contrast to
 F</cdrom/install> fails.  The upper eight bits reflect specific error
 conditions encountered by the program (the program's C<exit()> value).
 The lower eight bits reflect mode of failure, like signal death and
 core dump information.  See L<wait(2)> for details.  In contrast to
-C<$!> and C<$^E>, which are set only if error condition is detected,
+C<$!> and C<$^E>, which are set only if an error condition is detected,
 the variable C<$?> is set on each C<wait> or pipe C<close>,
 overwriting the old value.  This is more like C<$@>, which on every
 C<eval()> is always set on failure and cleared on success.
 the variable C<$?> is set on each C<wait> or pipe C<close>,
 overwriting the old value.  This is more like C<$@>, which on every
 C<eval()> is always set on failure and cleared on success.
@@ -1701,7 +1703,7 @@ This variable was added in Perl v5.10.0.
 X<$^E> X<$EXTENDED_OS_ERROR>
 
 Error information specific to the current operating system.  At the
 X<$^E> X<$EXTENDED_OS_ERROR>
 
 Error information specific to the current operating system.  At the
-moment, this differs from C<$!> under only VMS, OS/2, and Win32 (and
+moment, this differs from C<L</$!>> under only VMS, OS/2, and Win32 (and
 for MacPerl).  On all other platforms, C<$^E> is always just the same
 as C<$!>.
 
 for MacPerl).  On all other platforms, C<$^E> is always just the same
 as C<$!>.
 
@@ -1719,7 +1721,7 @@ from within the Win32 API.  Most Win32-specific code will report errors
 via C<$^E>.  ANSI C and Unix-like calls set C<errno> and so most
 portable Perl code will report errors via C<$!>.
 
 via C<$^E>.  ANSI C and Unix-like calls set C<errno> and so most
 portable Perl code will report errors via C<$!>.
 
-Caveats mentioned in the description of C<$!> generally apply to
+Caveats mentioned in the description of C<L</$!>> generally apply to
 C<$^E>, also.
 
 This variable was added in Perl 5.003.
 C<$^E>, also.
 
 This variable was added in Perl 5.003.
@@ -1819,10 +1821,12 @@ Each element of C<%!> has a true value only if C<$!> is set to that
 value.  For example, C<$!{ENOENT}> is true if and only if the current
 value of C<$!> is C<ENOENT>; that is, if the most recent error was "No
 such file or directory" (or its moral equivalent: not all operating
 value.  For example, C<$!{ENOENT}> is true if and only if the current
 value of C<$!> is C<ENOENT>; that is, if the most recent error was "No
 such file or directory" (or its moral equivalent: not all operating
-systems give that exact error, and certainly not all languages).  To
-check if a particular key is meaningful on your system, use C<exists
-$!{the_key}>; for a list of legal keys, use C<keys %!>.  See L<Errno>
-for more information, and also see L</$!>.
+systems give that exact error, and certainly not all languages).  The
+specific true value is not guaranteed, but in the past has generally
+been the numeric value of C<$!>.  To check if a particular key is
+meaningful on your system, use C<exists $!{the_key}>; for a list of legal
+keys, use C<keys %!>.  See L<Errno> for more information, and also see
+L</$!>.
 
 This variable was added in Perl 5.005.
 
 
 This variable was added in Perl 5.005.
 
@@ -1864,17 +1868,18 @@ Mnemonic: similar to B<sh> and B<ksh>.
 =item $@
 X<$@> X<$EVAL_ERROR>
 
 =item $@
 X<$@> X<$EVAL_ERROR>
 
-The Perl syntax error message from the
-last C<eval()> operator.  If C<$@> is
-the null string, the last C<eval()> parsed and executed correctly
-(although the operations you invoked may have failed in the normal
-fashion).
+The Perl error from the last C<eval> operator, i.e. the last exception that
+was caught.  For C<eval BLOCK>, this is either a runtime error message or the
+string or reference C<die> was called with.  The C<eval STRING> form also
+catches syntax errors and other compile time exceptions.
+
+If no error occurs, C<eval> sets C<$@> to the empty string.
 
 Warning messages are not collected in this variable.  You can, however,
 set up a routine to process warnings by setting C<$SIG{__WARN__}> as
 described in L</%SIG>.
 
 
 Warning messages are not collected in this variable.  You can, however,
 set up a routine to process warnings by setting C<$SIG{__WARN__}> as
 described in L</%SIG>.
 
-Mnemonic: Where was the syntax error "at"?
+Mnemonic: Where was the error "at"?
 
 =back
 
 
 =back
 
@@ -1903,32 +1908,29 @@ This variable was added in Perl v5.6.0.
 X<$^D> X<$DEBUGGING>
 
 The current value of the debugging flags.  May be read or set.  Like its
 X<$^D> X<$DEBUGGING>
 
 The current value of the debugging flags.  May be read or set.  Like its
-command-line equivalent, you can use numeric or symbolic values, eg
-C<$^D = 10> or C<$^D = "st">.
+L<command-line equivalent|perlrun/B<-D>I<letters>>, you can use numeric
+or symbolic values, e.g. C<$^D = 10> or C<$^D = "st">.  See
+L<perlrun/B<-D>I<number>>.  The contents of this variable also affects the
+debugger operation.  See L<perldebguts/Debugger Internals>.
 
 Mnemonic: value of B<-D> switch.
 
 =item ${^ENCODING}
 X<${^ENCODING}>
 
 
 Mnemonic: value of B<-D> switch.
 
 =item ${^ENCODING}
 X<${^ENCODING}>
 
-DEPRECATED!!!
+This variable is no longer supported.
 
 
-The I<object reference> to the C<Encode> object that is used to convert
-the source code to Unicode.  Thanks to this variable your Perl script
-does not have to be written in UTF-8.  Default is C<undef>.
+It used to hold the I<object reference> to the C<Encode> object that was
+used to convert the source code to Unicode.
 
 
-Setting this variable to any other value than C<undef> is deprecated due
-to fundamental defects in its design and implementation.  It is planned
-to remove it from a future Perl version.  Its purpose was to allow your
-non-ASCII Perl scripts to not have to be written in UTF-8; this was
+Its purpose was to allow your non-ASCII Perl
+scripts not to have to be written in UTF-8; this was
 useful before editors that worked on UTF-8 encoded text were common, but
 useful before editors that worked on UTF-8 encoded text were common, but
-that was long ago.  It causes problems, such as affecting the operation
-of other modules that aren't expecting it, causing general mayhem.  Its
-use can lead to segfaults.
+that was long ago.  It caused problems, such as affecting the operation
+of other modules that weren't expecting it, causing general mayhem.
 
 
-If you need something like this functionality, you should use the
-L<encoding> pragma, which is also deprecated, but has fewer nasty side
-effects.
+If you need something like this functionality, it is recommended that use
+you a simple source filter, such as L<Filter::Encoding>.
 
 If you are coming here because code of yours is being adversely affected
 by someone's use of this variable, you can usually work around it by
 
 If you are coming here because code of yours is being adversely affected
 by someone's use of this variable, you can usually work around it by
@@ -1940,7 +1942,7 @@ near the beginning of the functions that are getting broken.  This
 undefines the variable during the scope of execution of the including
 function.
 
 undefines the variable during the scope of execution of the including
 function.
 
-This variable was added in Perl 5.8.2.
+This variable was added in Perl 5.8.2 and removed in 5.26.0.
 
 =item ${^GLOBAL_PHASE}
 X<${^GLOBAL_PHASE}>
 
 =item ${^GLOBAL_PHASE}
 X<${^GLOBAL_PHASE}>