fix typo
[p5sagit/p5-mst-13.2.git] / pod / perldelta.pod
index ef6fa00..e7eab2b 100644 (file)
@@ -649,9 +649,13 @@ of the traditional two-argument form.  See L<perlfunc/open>.
     NOTE: The Configure flags -Duselonglong and -Duse64bits have been
     deprecated.  Use -Duse64bitint instead.
 
-Any platform that has 64-bit integers either (a) natively as longs or
-ints (b) via special compiler flags, or (c) using long long are able to
-use "quads" (64-bit integers) as follows:
+Any platform that has 64-bit integers either
+
+       (1) natively as longs or ints
+       (2) via special compiler flags
+       (3) using long long or int64_t
+
+are able to use "quads" (64-bit integers) as follows:
 
 =over 4
 
@@ -697,21 +701,28 @@ and compile Perl using the -Duse64bitint Configure flag.
 There are actually two modes of 64-bitness: the first one is achieved
 using Configure -Duse64bitint and the second one using Configure
 -Duse64bitall.  The difference is that the first one is minimal and
-the second one maximal.  The first one does only as much as is
-required to get 64-bit integers into Perl (this may mean, for example,
-using "long longs") while your memory may still be limited to 2
-gigabytes (because your pointers are still allowed to be 32-bit); the
-second one goes all the way by attempting to switch also longs (and
-pointers) to being 64-bit.  This may create an even more binary
-incompatible Perl than -Duse64bitint: the resulting executable may not
-run at all in a 32-bit box, or you may have to reboot/reconfigure/rebuild
-your operating system to be 64-bit aware.
+the second one maximal.
+
+The C<use64bitint> does only as much as is required to get 64-bit
+integers into Perl (this may mean, for example, using "long longs")
+while your memory may still be limited to 2 gigabytes (because your
+pointers could still be 32-bit).  Note that the name C<64bitint> does
+not imply that your C compiler will be using 64-bit C<int>s (it might,
+but it doesn't have to): the C<use64bitint> means that you will be
+able to have 64 bits wide scalar values.
+
+The C<use64bitall> goes all the way by attempting to switch also
+integers (if it can), longs (and pointers) to being 64-bit.  This may
+create an even more binary incompatible Perl than -Duse64bitint: the
+resulting executable may not run at all in a 32-bit box, or you may
+have to reboot/reconfigure/rebuild your operating system to be 64-bit
+aware.
 
 Natively 64-bit systems like Alpha and Cray need neither -Duse64bitint
 nor -Duse64bitall.
 
 Last but not least: note that due to Perl's habit of always using
-floating point numbers the quads are still not true integers.
+floating point numbers, the quads are still not true integers.
 When quads overflow their limits (0...18_446_744_073_709_551_615 unsigned,
 -9_223_372_036_854_775_808...9_223_372_036_854_775_807 signed), they
 are silently promoted to floating point numbers, after which they will
@@ -721,10 +732,15 @@ start losing precision (in their lower digits).
 
 If you have filesystems that support "large files" (files larger than
 2 gigabytes), you may now also be able to create and access them from
-Perl.  You have to use Configure -Duselargefiles.  Turning on the
-large file support also turns on 64-bit support on many platforms.
-Beware that unless your filesystem also supports "sparse files" seeking
-to umpteen petabytes may be unadvisable.
+Perl.  NOTE: the default action is to use the large file support, if
+available on the platform.
+
+If the large file support is on, and you have a Fcntl constant
+O_LARGEFILE, the O_LARGEFILE is automatically added to the flags
+of sysopen().
+
+Beware: unless your filesystem also supports "sparse files" seeking to
+umpteen petabytes may be unadvisable.
 
 Note that in addition to requiring a proper file system to do large
 files you may also need to adjust your per-process (or your
@@ -1144,6 +1160,19 @@ Unrecognized alphabetic escapes encountered when parsing quote
 constructs now generate a warning, since they may take on new
 semantics in later versions of Perl.
 
+Many diagnostics now report the internal operation in which the warning
+was provoked, like so:
+
+    Use of uninitialized value in concatenation (.) at (eval 1) line 1.
+    Use of uninitialized value in print at (eval 1) line 1.
+
+Diagnostics  that occur within eval may also report the file and line
+number where the eval is located, in addition to the eval sequence
+number and the line number within the evaluated text itself.  For
+example:
+
+    Not enough arguments for scalar at (eval 4)[newlib/perl5db.pl:1411] line 2, at EOF
+
 =head1 Performance enhancements
 
 =head2 Simple sort() using { $a <=> $b } and the like are optimized
@@ -1489,15 +1518,14 @@ variables.
 =item Fcntl
 
 More Fcntl constants added: F_SETLK64, F_SETLKW64, O_LARGEFILE for
-large file (more than 4GB) access Note that the O_LARGEFILE is
-automatically/transparently added to sysopen() flags if large file
-support has been configured), Free/Net/OpenBSD locking behaviour flags
-F_FLOCK, F_POSIX, Linux F_SHLCK, and O_ACCMODE: the combined mask of
-O_RDONLY, O_WRONLY, and O_RDWR.  The seek()/sysseek() constants
-SEEK_SET, SEEK_CUR, and SEEK_END are available via the C<:seek> tag.
-The chmod()/stat() S_IF* constants and S_IS* functions are available
-via the C<:mode> tag.
-
+large file (more than 4GB) access (NOTE: the O_LARGEFILE is
+automatically added to sysopen() flags if large file support has been
+configured, as is the default), Free/Net/OpenBSD locking behaviour
+flags F_FLOCK, F_POSIX, Linux F_SHLCK, and O_ACCMODE: the combined
+mask of O_RDONLY, O_WRONLY, and O_RDWR.  The seek()/sysseek()
+constants SEEK_SET, SEEK_CUR, and SEEK_END are available via the
+C<:seek> tag.  The chmod()/stat() S_IF* constants and S_IS* functions
+are available via the C<:mode> tag.
 
 =item File::Compare
 
@@ -1843,6 +1871,26 @@ optimized C backend.
 
 Support for non-Unix platforms has been improved.
 
+=head2 perldoc
+
+C<perldoc> has been reworked to avoid possible security holes.
+It will not by default let itself be run as the superuser, but you
+may still use the B<-U> switch to try to make it drop privileges
+first.
+
+=head2 The Perl Debugger
+
+Many bug fixes and enhancements were added to F<perl5db.pl>, the
+Perl debugger.  The help documentation was rearranged.  New commands
+include C<< < ? >>, C<< > ? >>, and C<< { ? >> to list out current
+actions, C<man I<docpage>> to run your doc viewer on some perl
+docset, and support for quoted options.  The help information was
+rearranged, and should be viewable once again if you're using B<less>
+as your pager.  A serious security hole was plugged--you should
+immediately remove all older versions of the Perl debugger as
+installed in previous releases, all the way back to perl3, from
+your system to avoid being bitten by this.
+
 =head1 Documentation Changes
 
 =over 4
@@ -1855,6 +1903,21 @@ The official list of public Perl API functions.
 
 An introduction to using the Perl Compiler suite.
 
+=item perldebug.pod
+
+All material unrelated to running the Perl debugger, plus all
+low-level guts-like details that risked crushing the casual user
+of the debugger, have been relocated from the old manpage to the
+next entry below.
+
+=item perldebguts.pod
+
+This new manpage contains excessively low-level material not related
+to the Perl debugger, but slightly related to debugging Perl itself.
+It also contains some arcane internal details of how the debugging
+process works that may only be of interest to developers of Perl
+debuggers.
+
 =item perlfilter.pod
 
 An introduction to writing Perl source filters.
@@ -1896,7 +1959,7 @@ An introduction to Unicode support features in Perl.
 
 =item "%s" variable %s masks earlier declaration in same %s
 
-(W) A "my" or "our" variable has been redeclared in the current scope or statement,
+(W misc) A "my" or "our" variable has been redeclared in the current scope or statement,
 effectively eliminating all access to the previous instance.  This is almost
 always a typographical error.  Note that the earlier variable will still exist
 until the end of the scope or until all closure referents to it are
@@ -1909,7 +1972,7 @@ yet.
 
 =item "our" variable %s redeclared
 
-(W) You seem to have already declared the same global once before in the
+(W misc) You seem to have already declared the same global once before in the
 current lexical scope.
 
 =item '!' allowed only after types %s
@@ -1944,25 +2007,25 @@ See L<perlfunc/pack>.
 
 =item /%s/: Unrecognized escape \\%c passed through
 
-(W) You used a backslash-character combination which is not recognized
+(W regexp) You used a backslash-character combination which is not recognized
 by Perl.  This combination appears in an interpolated variable or a
 C<'>-delimited regular expression.  The character was understood literally.
 
 =item /%s/: Unrecognized escape \\%c in character class passed through
 
-(W) You used a backslash-character combination which is not recognized
+(W regexp) You used a backslash-character combination which is not recognized
 by Perl inside character classes.  The character was understood literally.
 
 =item /%s/ should probably be written as "%s"
 
-(W) You have used a pattern where Perl expected to find a string,
+(W syntax) You have used a pattern where Perl expected to find a string,
 as in the first argument to C<join>.  Perl will treat the true
 or false result of matching the pattern against $_ as the string,
 which is probably not what you had in mind.
 
 =item %s() called too early to check prototype
 
-(W) You've called a function that has a prototype before the parser saw a
+(W prototype) You've called a function that has a prototype before the parser saw a
 definition or declaration for it, and Perl could not check that the call
 conforms to the prototype.  You need to either add an early prototype
 declaration for the subroutine in question, or move the subroutine
@@ -1996,14 +2059,14 @@ name, and not a subroutine call.  C<exists &sub()> will generate this error.
 
 =item %s package attribute may clash with future reserved word: %s
 
-(W) A lowercase attribute name was used that had a package-specific handler.
+(W reserved) A lowercase attribute name was used that had a package-specific handler.
 That name might have a meaning to Perl itself some day, even though it
 doesn't yet.  Perhaps you should use a mixed-case attribute name, instead.
 See L<attributes>.
 
 =item         (in cleanup) %s
 
-(W) This prefix usually indicates that a DESTROY() method raised
+(W misc) This prefix usually indicates that a DESTROY() method raised
 the indicated exception.  Since destructors are usually called by
 the system at arbitrary points during execution, and often a vast
 number of times, the warning is issued only once for any number
@@ -2038,7 +2101,7 @@ setting environment variable C<PERL_BADFREE> to 1.
 
 =item Bareword found in conditional
 
-(W) The compiler found a bareword where it expected a conditional,
+(W bareword) The compiler found a bareword where it expected a conditional,
 which often indicates that an || or && was parsed as part of the
 last argument of the previous construct, for example:
 
@@ -2054,17 +2117,17 @@ The C<strict> pragma is useful in avoiding such errors.
 
 =item Binary number > 0b11111111111111111111111111111111 non-portable
 
-(W) The binary number you specified is larger than 2**32-1
+(W portable) The binary number you specified is larger than 2**32-1
 (4294967295) and therefore non-portable between systems.  See
 L<perlport> for more on portability concerns.
 
 =item Bit vector size > 32 non-portable
 
-(W) Using bit vector sizes larger than 32 is non-portable.
+(W portable) Using bit vector sizes larger than 32 is non-portable.
 
 =item Buffer overflow in prime_env_iter: %s
 
-(W) A warning peculiar to VMS.  While Perl was preparing to iterate over
+(W internal) A warning peculiar to VMS.  While Perl was preparing to iterate over
 %ENV, it encountered a logical name or symbol definition which was too long,
 so it was truncated to the string shown.
 
@@ -2085,7 +2148,7 @@ for other types of variables in future.
 
 =item Can't ignore signal CHLD, forcing to default
 
-(W) Perl has detected that it is being run with the SIGCHLD signal
+(W signal) Perl has detected that it is being run with the SIGCHLD signal
 (sometimes known as SIGCLD) disabled.  Since disabling this signal
 will interfere with proper determination of exit status of child
 processes, Perl has reset the signal to its default value.
@@ -2128,7 +2191,7 @@ See L<perlre>.
 
 =item Character class syntax [%s] belongs inside character classes
 
-(W) The character class constructs [: :], [= =], and [. .]  go
+(W unsafe) The character class constructs [: :], [= =], and [. .]  go
 I<inside> character classes, the [] are part of the construct,
 for example: /[012[:alpha:]345]/.  Note that [= =] and [. .]
 are not currently implemented; they are simply placeholders for
@@ -2142,15 +2205,12 @@ message indicates the type of reference that was expected. This usually
 indicates a syntax error in dereferencing the constant value.
 See L<perlsub/"Constant Functions"> and L<constant>.
 
-=item constant(%s): %%^H is not localized
-
-(F) When setting compile-time-lexicalized hash %^H one should set the 
-corresponding bit of $^H as well.
-
 =item constant(%s): %s
 
-(F) Compile-time-substitutions (such as overloaded constants and
-character names) were not correctly set up.
+(F) The parser found inconsistencies either while attempting to define an
+overloaded constant, or when trying to find the character name specified
+in the C<\N{...}> escape.  Perhaps you forgot to load the corresponding
+C<overload> or C<charnames> pragma?  See L<charnames> and L<overload>.
 
 =item CORE::%s is not a keyword
 
@@ -2174,7 +2234,7 @@ See Server error.
 
 =item Did you mean "local" instead of "our"?
 
-(W) Remember that "our" does not localize the declared global variable.
+(W misc) Remember that "our" does not localize the declared global variable.
 You have declared it again in the same lexical scope, which seems superfluous.
 
 =item Document contains no data
@@ -2188,14 +2248,14 @@ effective uids or gids failed.
 
 =item false [] range "%s" in regexp
 
-(W) A character class range must start and end at a literal character, not
+(W regexp) A character class range must start and end at a literal character, not
 another character class like C<\d> or C<[:alpha:]>.  The "-" in your false
 range is interpreted as a literal "-".  Consider quoting the "-",  "\-".
 See L<perlre>.
 
 =item Filehandle %s opened only for output
 
-(W) You tried to read from a filehandle opened only for writing.  If you
+(W io) You tried to read from a filehandle opened only for writing.  If you
 intended it to be a read/write filehandle, you needed to open it with
 "+<" or "+>" or "+>>" instead of with "<" or nothing.  If
 you intended only to read from the file, use "<".  See
@@ -2203,7 +2263,7 @@ L<perlfunc/open>.
 
 =item flock() on closed filehandle %s
 
-(W) The filehandle you're attempting to flock() got itself closed some
+(W closed) The filehandle you're attempting to flock() got itself closed some
 time before now.  Check your logic flow.  flock() operates on filehandles.
 Are you attempting to call flock() on a dirhandle by the same name?
 
@@ -2216,19 +2276,19 @@ is in (using "::").
 
 =item Hexadecimal number > 0xffffffff non-portable
 
-(W) The hexadecimal number you specified is larger than 2**32-1
+(W portable) The hexadecimal number you specified is larger than 2**32-1
 (4294967295) and therefore non-portable between systems.  See
 L<perlport> for more on portability concerns.
 
 =item Ill-formed CRTL environ value "%s"
 
-(W) A warning peculiar to VMS.  Perl tried to read the CRTL's internal
+(W internal) A warning peculiar to VMS.  Perl tried to read the CRTL's internal
 environ array, and encountered an element without the C<=> delimiter
 used to spearate keys from values.  The element is ignored.
 
 =item Ill-formed message in prime_env_iter: |%s|
 
-(W) A warning peculiar to VMS.  Perl tried to read a logical name
+(W internal) A warning peculiar to VMS.  Perl tried to read a logical name
 or CLI symbol definition when preparing to iterate over %ENV, and
 didn't see the expected delimiter between key and value, so the
 line was ignored.
@@ -2239,7 +2299,7 @@ line was ignored.
 
 =item Illegal binary digit %s ignored
 
-(W) You may have tried to use a digit other than 0 or 1 in a binary number.
+(W digit) You may have tried to use a digit other than 0 or 1 in a binary number.
 Interpretation of the binary number stopped before the offending digit.
 
 =item Illegal number of bits in vec
@@ -2249,7 +2309,7 @@ two from 1 to 32 (or 64, if your platform supports that).
 
 =item Integer overflow in %s number
 
-(W) The hexadecimal, octal or binary number you have specified either
+(W overflow) The hexadecimal, octal or binary number you have specified either
 as a literal or as an argument to hex() or oct() is too big for your
 architecture, and has been converted to a floating point number.  On a
 32-bit architecture the largest hexadecimal, octal or binary number
@@ -2309,7 +2369,7 @@ double-quotish context.
 
 =item Missing command in piped open
 
-(W) You used the C<open(FH, "| command")> or C<open(FH, "command |")>
+(W pipe) You used the C<open(FH, "| command")> or C<open(FH, "command |")>
 construction, but the command was missing or blank.
 
 =item Missing name in "my sub"
@@ -2343,7 +2403,7 @@ get local time.
 
 =item Octal number > 037777777777 non-portable
 
-(W) The octal number you specified is larger than 2**32-1 (4294967295)
+(W portable) The octal number you specified is larger than 2**32-1 (4294967295)
 and therefore non-portable between systems.  See L<perlport> for more
 on portability concerns.
 
@@ -2365,7 +2425,7 @@ references to an object.
 
 =item Parentheses missing around "%s" list
 
-(W) You said something like
+(W parenthesis) You said something like
 
     my $foo, $bar = @_;
 
@@ -2377,9 +2437,28 @@ Remember that "my", "our", and "local" bind tighter than comma.
 
 =item Possible Y2K bug: %s
 
-(W) You are concatenating the number 19 with another number, which
+(W y2k) You are concatenating the number 19 with another number, which
 could be a potential Year 2000 problem.
 
+=item pragma "attrs" is deprecated, use "sub NAME : ATTRS" instead
+
+(W deprecated) You have written somehing like this:
+
+    sub doit
+    {
+        use attrs qw(locked);
+    }
+
+You should use the new declaration syntax instead.
+
+    sub doit : locked
+    {
+        ...
+
+The C<use attrs> pragma is now obsolete, and is only provided for
+backward-compatibility. See L<perlsub/"Subroutine Attributes">.
+
+
 =item Premature end of script headers
 
 See Server error.
@@ -2401,7 +2480,7 @@ been freed.
 
 =item Reference is already weak
 
-(W) You have attempted to weaken a reference that is already weak.
+(W misc) You have attempted to weaken a reference that is already weak.
 Doing so has no effect.
 
 =item setpgrp can't take arguments
@@ -2411,7 +2490,7 @@ unlike POSIX setpgid(), which takes a process ID and process group ID.
 
 =item Strange *+?{} on zero-length expression
 
-(W) You applied a regular expression quantifier in a place where it
+(W regexp) You applied a regular expression quantifier in a place where it
 makes no sense, such as on a zero-width assertion.
 Try putting the quantifier inside the assertion instead.  For example,
 the way to match "abc" provided that it is followed by three
@@ -2426,13 +2505,21 @@ real and effective uids or gids.
 
 =item This Perl can't set CRTL environ elements (%s=%s)
 
-(W) Warnings peculiar to VMS.  You tried to change or delete an element
+(W internal) Warnings peculiar to VMS.  You tried to change or delete an element
 of the CRTL's internal environ array, but your copy of Perl wasn't
 built with a CRTL that contained the setenv() function.  You'll need to
 rebuild Perl with a CRTL that does, or redefine F<PERL_ENV_TABLES> (see
 L<perlvms>) so that the environ array isn't the target of the change to
 %ENV which produced the warning.
 
+=item Too late to run %s block
+
+(W void) A CHECK or INIT block is being defined during run time proper,
+when the opportunity to run them has already passed.  Perhaps you are
+loading a file with C<require> or C<do> when you should be using
+C<use> instead.  Or perhaps you should put the C<require> or C<do>
+inside a BEGIN block.
+
 =item Unknown open() mode '%s'
 
 (F) The second argument of 3-argument open() is not among the list
@@ -2448,7 +2535,7 @@ subvert Perl's population of %ENV for nefarious purposes.
 
 =item Unrecognized escape \\%c passed through
 
-(W) You used a backslash-character combination which is not recognized
+(W misc) You used a backslash-character combination which is not recognized
 by Perl.  The character was understood literally.
 
 =item Unterminated attribute parameter in attribute list
@@ -2481,7 +2568,7 @@ too soon.
 
 =item Value of CLI symbol "%s" too long
 
-(W) A warning peculiar to VMS.  Perl tried to read the value of an %ENV
+(W misc) A warning peculiar to VMS.  Perl tried to read the value of an %ENV
 element from a CLI symbol table, and found a resultant string longer
 than 1024 characters.  The return value has been truncated to 1024
 characters.