change #22071 (taint bug in $^0) introduced a potential double
[p5sagit/p5-mst-13.2.git] / pod / perldiag.pod
index 0669db6..69c22d6 100644 (file)
@@ -163,6 +163,15 @@ error.
 that expected a numeric value instead.  If you're fortunate the message
 will identify which operator was so unfortunate.
 
+=item Argument list not closed for PerlIO layer "%s"
+
+(W layer) When pushing a layer with arguments onto the Perl I/O system you
+forgot the ) that closes the argument list.  (Layers take care of transforming
+data between external and internal representations.)  Perl stopped parsing
+the layer list at this point and did not attempt to push this layer.
+If your program didn't explicitly request the failing operation, it may be
+the result of the value of the environment variable PERLIO.
+
 =item Array @%s missing the @ in argument %d of %s()
 
 (D deprecated) Really old Perl let you omit the @ on array names in some
@@ -898,18 +907,10 @@ the command line for writing.
 redirection, and couldn't open the pipe into which to send data destined
 for stdout.
 
-=item Can't open perl script%s: %s
+=item Can't open perl script%s
 
 (F) The script you specified can't be opened for the indicated reason.
 
-=item Can't provide tied hash usage; use keys(%hash) to test if empty
-
-(F) When a hash is evaluated in scalar context, bucket usage is
-returned if the hash is populated, and false is returned if the hash
-is empty.  Bucket usage is not currently available for tied hashes.
-To test if a hash is empty or populated, use keys(%hash) in scalar
-context instead.
-
 =item Can't read CRTL environ
 
 (S) A warning peculiar to VMS.  Perl tried to read an element of %ENV
@@ -1284,6 +1285,12 @@ there are neither package declarations nor a C<$VERSION>.
 long for Perl to handle.  You have to be seriously twisted to write code
 that triggers this error.
 
+=item DESTROY created new reference to dead object '%s'
+
+(F) A DESTROY() method created a new reference to the object which is
+just being DESTROYed. Perl is confused, and prefers to abort rather than
+to create a dangling reference.
+
 =item Did not produce a valid header
 
 See Server error.
@@ -1341,8 +1348,8 @@ See L<perlfunc/pack>.
 
 =item (Do you need to predeclare %s?)
 
-(S) This is an educated guess made in conjunction with the message "%s
-found where operator expected".  It often means a subroutine or module
+(S syntax) This is an educated guess made in conjunction with the message
+"%s found where operator expected".  It often means a subroutine or module
 name is being referenced that hasn't been declared yet.  This may be
 because of ordering problems in your file, or because of a missing
 "sub", "package", "require", or "use" statement.  If you're referencing
@@ -1362,8 +1369,8 @@ already been freed.
 
 =item elseif should be elsif
 
-(S) There is no keyword "elseif" in Perl because Larry thinks it's ugly.
-Your code will be interpreted as an attempt to call a method named
+(S syntax) There is no keyword "elseif" in Perl because Larry thinks it's
+ugly. Your code will be interpreted as an attempt to call a method named
 "elseif" for the class returned by the following block.  This is
 unlikely to be what you want.
 
@@ -1378,6 +1385,12 @@ a regular expression without specifying the property name.
 (F) While under the C<use filetest> pragma, switching the real and
 effective uids or gids failed.
 
+=item %ENV is aliased to %s
+
+(F) You're running under taint mode, and the C<%ENV> variable has been
+aliased to another hash, so it doesn't reflect anymore the state of the
+program's environment. This is potentially insecure.
+
 =item Error converting file specification %s
 
 (F) An error peculiar to VMS.  Because Perl may have to deal with file
@@ -1555,8 +1568,8 @@ when you meant
 
 =item %s found where operator expected
 
-(S) The Perl lexer knows whether to expect a term or an operator.  If it
-sees what it knows to be a term when it was expecting to see an
+(S syntax) The Perl lexer knows whether to expect a term or an operator.
+If it sees what it knows to be a term when it was expecting to see an
 operator, it gives you this warning.  Usually it indicates that an
 operator or delimiter was omitted, such as a semicolon.
 
@@ -1640,12 +1653,6 @@ supposed to follow something: a template character or a ()-group.
 to have existed already, but for some reason it didn't, and had to be
 created on an emergency basis to prevent a core dump.
 
-=item $* has been removed
-
-(D deprecated) The special variable C<$*>, deprecated in older perls, has
-been removed as of 5.9.0 and is no longer supported. You should use the
-C<//m> and C<//s> regexp modifiers instead.
-
 =item Hash %%s missing the % in argument %d of %s()
 
 (D deprecated) Really old Perl let you omit the % on hash names in some
@@ -1876,6 +1883,13 @@ elements of an attribute list.  If the previous attribute had a
 parenthesised parameter list, perhaps that list was terminated too soon.
 See L<attributes>.
 
+=item Invalid separator character %s in PerlIO layer specification %s
+
+(W layer) When pushing layers onto the Perl I/O system, something other than a
+colon or whitespace was seen between the elements of a layer list.
+If the previous attribute had a parenthesised parameter list, perhaps that
+list was terminated too soon.
+
 =item Invalid type '%s' in %s
 
 (F) The given character is not a valid pack or unpack type.
@@ -1904,11 +1918,23 @@ strange for a machine that supports C.
 (W unopened) You tried ioctl() on a filehandle that was never opened.
 Check you control flow and number of arguments.
 
+=item IO layers (like "%s") unavailable
+
+(F) Your Perl has not been configured to have PerlIO, and therefore
+you cannot use IO layers.  To have PerlIO Perl must be configured
+with 'useperlio'.
+
 =item IO::Socket::atmark not implemented on this architecture
 
 (F) Your machine doesn't implement the sockatmark() functionality,
 neither as a system call or an ioctl call (SIOCATMARK).
 
+=item $* is no longer supported
+
+(D deprecated) The special variable C<$*>, deprecated in older perls, has
+been removed as of 5.9.0 and is no longer supported. You should use the
+C<//m> and C<//s> regexp modifiers instead.
+
 =item `%s' is not a code reference
 
 (W overload) The second (fourth, sixth, ...) argument of overload::constant
@@ -2094,8 +2120,8 @@ can vary from one line to the next.
 
 =item (Missing operator before %s?)
 
-(S) This is an educated guess made in conjunction with the message "%s
-found where operator expected".  Often the missing operator is a comma.
+(S syntax) This is an educated guess made in conjunction with the message
+"%s found where operator expected".  Often the missing operator is a comma.
 
 =item Missing right brace on %s
 
@@ -2109,8 +2135,8 @@ were last editing.
 
 =item (Missing semicolon on previous line?)
 
-(S) This is an educated guess made in conjunction with the message "%s
-found where operator expected".  Don't automatically put a semicolon on
+(S syntax) This is an educated guess made in conjunction with the message
+"%s found where operator expected".  Don't automatically put a semicolon on
 the previous line just because you saw this message.
 
 =item Modification of a read-only value attempted
@@ -2199,6 +2225,11 @@ If you had a good reason for having a unique name, then just mention it
 again somehow to suppress the message.  The C<our> declaration is
 provided for this purpose.
 
+NOTE: This warning detects symbols that have been used only once so $c, @c,
+%c, *c, &c, sub c{}, c(), and c (the filehandle or format) are considered
+the same; if a program uses $c only once but also uses any of the others it
+will not trigger this warning.
+
 =item Negative '/' count in unpack
 
 (F) The length count obtained from a length/code unpack operation was
@@ -2656,6 +2687,13 @@ there are in the savestack.
 (P) Failed an internal consistency check while trying to reset a weak
 reference.
 
+=item panic: Devel::DProf inconsistent subroutine return
+
+(P) Devel::DProf called a subroutine that exited using goto(LABEL),
+last(LABEL) or next(LABEL). Leaving that way a subroutine called from
+an XSUB will lead very probably to a crash of the interpreter. This is
+a bug that will hopefully one day get fixed.
+
 =item panic: die %s
 
 (P) We popped the context stack to an eval context, and then discovered
@@ -2829,31 +2867,6 @@ redirected it with select().)
 "Can't locate object method \"%s\" via package \"%s\"".  It often means
 that a method requires a package that has not been loaded.
 
-=item perlio: argument list not closed for layer "%s"
-
-(W layer) When pushing a layer with arguments onto the Perl I/O system you
-forgot the ) that closes the argument list.  (Layers take care of transforming
-data between external and internal representations.)  Perl stopped parsing
-the layer list at this point and did not attempt to push this layer.
-If your program didn't explicitly request the failing operation, it may be
-the result of the value of the environment variable PERLIO.
-
-=item perlio: invalid separator character %s in layer specification list %s
-
-(W layer) When pushing layers onto the Perl I/O system, something other than a
-colon or whitespace was seen between the elements of a layer list.
-If the previous attribute had a parenthesised parameter list, perhaps that
-list was terminated too soon.
-
-=item perlio: unknown layer "%s"
-
-(W layer) An attempt was made to push an unknown layer onto the Perl I/O
-system.  (Layers take care of transforming data between external and
-internal representations.)  Note that some layers, such as C<mmap>,
-are not supported in all environments.  If your program didn't
-explicitly request the failing operation, it may be the result of the
-value of the environment variable PERLIO.
-
 =item Perl %s required--this is only version %s, stopped
 
 (F) The module in question uses features of a version of Perl more
@@ -3202,6 +3215,12 @@ expression compiler gave it.
 (P) A "can't happen" error, because safemalloc() should have caught it
 earlier.
 
+=item Repeated format line will never terminate (~~ and @# incompatible)
+
+(F) Your format containes the ~~ repeat-until-blank sequence and a
+numeric field that will never go blank so that the repetition never
+terminates. You might use ^# instead.  See L<perlform>.
+
 =item Reversed %s= operator
 
 (W syntax) You wrote your assignment operator backwards.  The = must
@@ -3865,6 +3884,15 @@ order.
 of valid modes: C<< < >>, C<< > >>, C<<< >> >>>, C<< +< >>,
 C<< +> >>, C<<< +>> >>>, C<-|>, C<|->, C<< <& >>, C<< >& >>.
 
+=item Unknown PerlIO layer "%s"
+
+(W layer) An attempt was made to push an unknown layer onto the Perl I/O
+system.  (Layers take care of transforming data between external and
+internal representations.)  Note that some layers, such as C<mmap>,
+are not supported in all environments.  If your program didn't
+explicitly request the failing operation, it may be the result of the
+value of the environment variable PERLIO.
+
 =item Unknown process %x sent message to prime_env_iter: %s
 
 (P) An error peculiar to VMS.  Perl was reading values for %ENV before
@@ -4061,6 +4089,12 @@ must be written as
 The <-- HERE shows in the regular expression about
 where the problem was discovered. See L<perlre>.
 
+=item Useless localization of %s
+
+(W syntax) The localization of lvalues such as C<local($x=10)> is
+legal, but in fact the local() currently has no effect. This may change at
+some point in the future, but in the meantime such code is discouraged.
+
 =item Useless (?%s) - use /%s modifier in regex; marked by <-- HERE in m/%s/
 
 (W regexp) You have used an internal modifier such as (?o) that has no
@@ -4075,12 +4109,6 @@ must be written as
 The <-- HERE shows in the regular expression about
 where the problem was discovered. See L<perlre>.
 
-=item Useless localization of %s
-
-(W syntax) The localization of lvalues such as C<local($x=10)> is
-legal, but in fact the local() currently has no effect. This may change at
-some point in the future, but in the meantime such code is discouraged.
-
 =item Useless use of %s in void context
 
 (W void) You did something without a side effect in a context that does
@@ -4173,9 +4201,10 @@ modifier is not presently meaningful in substitutions.
 use the /g modifier.  Currently, /c is meaningful only when /g is
 used.  (This may change in the future.)
 
-=item Use of freed value in iteration (perhaps you modified the iterated array within the loop?)
+=item Use of freed value in iteration
 
-(F) This is typically caused by code like the following:
+(F) Perhaps you modified the iterated array within the loop?
+This error is typically caused by code like the following:
 
     @a = (3,4);
     @a = () for (1,2,@a);
@@ -4336,36 +4365,14 @@ C<defined> operator.
 longer than 1024 characters.  The return value has been truncated to
 1024 characters.
 
-=item Variable "%s" is not imported%s
-
-(F) While "use strict" in effect, you referred to a global variable that
-you apparently thought was imported from another module, because
-something else of the same name (usually a subroutine) is exported by
-that module.  It usually means you put the wrong funny character on the
-front of your variable.
-
-=item Variable length lookbehind not implemented in regex; marked by <-- HERE in m/%s/
-
-(F) Lookbehind is allowed only for subexpressions whose length is fixed and
-known at compile time. The <-- HERE shows in the regular expression about
-where the problem was discovered. See L<perlre>.
-
-=item "%s" variable %s masks earlier declaration in same %s
-
-(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 destroyed.
-
 =item Variable "%s" is not available
 
 (W closure) During compilation, an inner named subroutine or eval is
 attempting to capture an outer lexical that is not currently available.
-This can be happen for one of two reasons. First, the outer lexical may be
+This can happen for one of two reasons. First, the outer lexical may be
 declared in an outer anonymous subroutine that has not yet been created.
 (Remember that named subs are created at compile time, while anonymous
-subs are created at run-time. For example,
+subs are created at run-time.) For example,
 
     sub { my $a; sub f { $a } }
 
@@ -4388,6 +4395,28 @@ gone out of scope, for example,
 Here, when the '$a' in the eval is being compiled, f() is not currently being
 executed, so its $a is not available for capture.
 
+=item Variable "%s" is not imported%s
+
+(F) While "use strict" in effect, you referred to a global variable that
+you apparently thought was imported from another module, because
+something else of the same name (usually a subroutine) is exported by
+that module.  It usually means you put the wrong funny character on the
+front of your variable.
+
+=item Variable length lookbehind not implemented in regex; marked by <-- HERE in m/%s/
+
+(F) Lookbehind is allowed only for subexpressions whose length is fixed and
+known at compile time. The <-- HERE shows in the regular expression about
+where the problem was discovered. See L<perlre>.
+
+=item "%s" variable %s masks earlier declaration in same %s
+
+(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 destroyed.
+
 =item Variable syntax
 
 (A) You've accidentally run your script through B<csh> instead
@@ -4460,9 +4489,12 @@ So put in parentheses to say what you really mean.
 =item Wide character in %s
 
 (W utf8) Perl met a wide character (>255) when it wasn't expecting
-one.  This warning is by default on for I/O (like print) but can be
-turned off by C<no warnings 'utf8';>.  You are supposed to explicitly
-mark the filehandle with an encoding, see L<open> and L<perlfunc/binmode>.
+one.  This warning is by default on for I/O (like print).  The easiest
+way to quiet this warning is simply to add the C<:utf8> layer to the
+output, e.g. C<binmode STDOUT, ':utf8'>.  Another way to turn off the
+warning is to add C<no warnings 'utf8';> but that is often closer to
+cheating.  In general, you are supposed to explicitly mark the
+filehandle with an encoding, see L<open> and L<perlfunc/binmode>.
 
 =item Within []-length '%c' not allowed
 
@@ -4476,6 +4508,16 @@ of the codes @, /, U, u, w or a *-length. Redesign the template.
 (W closed) The filehandle you're writing to got itself closed sometime
 before now.  Check your control flow.
 
+=item %s "\x%s" does not map to Unicode
+
+When reading in different encodings Perl tries to map everything
+into Unicode characters.  The bytes you read in are not legal in
+this encoding, for example
+
+    utf8 "\xE4" does not map to Unicode
+
+if you try to read in the a-diaereses Latin-1 as UTF-8.
+
 =item 'X' outside of string
 
 (F) You had a (un)pack template that specified a relative position before
@@ -4511,6 +4553,12 @@ which means that Perl 5 will try to call the subroutine when the
 assignment is executed, which is probably not what you want.  (If it IS
 what you want, put an & in front.)
 
+=item Your random numbers are not that random
+
+(F) When trying to initialise the random seed for hashes, Perl could
+not get any randomness out of your system.  This usually indicates
+Something Very Wrong.
+
 =back
 
 =cut