This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add an example how to fix '%s: command not found'
[perl5.git] / pod / perldiag.pod
index b1e34b4..92e71c0 100644 (file)
@@ -614,6 +614,11 @@ be directly assigned to.
 (S io) You tried to apply an encoding that did not exist to a filehandle,
 either with open() or binmode().
 
+=item Cannot set tied @DB::args
+
+(F) C<caller> tried to set C<@DB::args>, but found it tied.  Tying C<@DB::args>
+is not supported.  (Before this error was added, it used to crash.)
+
 =item Cannot tie unreifiable array
 
 (P) You somehow managed to call C<tie> on an array that does not
@@ -1462,8 +1467,11 @@ and both these succeed:
 
 =item %s: Command not found
 
-(A) You've accidentally run your script through B<csh> instead of Perl.
-Check the #! line, or manually feed your script into Perl yourself.
+(A) You've accidentally run your script through B<csh> or another
+shell instead of Perl. Check the #! line, or manually feed your script into
+Perl yourself. The #! line at the top of your file could look like
+
+  #!/usr/bin/perl -w
 
 =item Compilation failed in require
 
@@ -2613,7 +2621,7 @@ because it has already switched from integers to floating point when values
 are too large for integers, and now even floating point is insufficient.
 You may wish to switch to using L<Math::BigInt> explicitly.
 
-=item lstat() on filehandle %s
+=item lstat() on filehandle%s
 
 (W io) You tried to do an lstat on a filehandle.  What did you mean
 by that?  lstat() makes sense only on filenames.  (Perl did a fstat()
@@ -3468,6 +3476,11 @@ the string being unpacked.  See L<perlfunc/pack>.
 the string being unpacked.  The string being unpacked was also invalid
 UTF-8.  See L<perlfunc/pack>.
 
+=item overload arg '%s' is invalid
+
+(W overload) The L<overload> pragma was passed an argument it did not
+recognize.  Did you mistype an operator?
+
 =item Overloaded dereference did not return a reference
 
 (F) An object with an overloaded dereference operator was dereferenced,
@@ -3507,15 +3520,15 @@ an ACL related-function, but that function is not available on this
 platform.  Earlier checks mean that it should not be possible to
 enter this branch on this platform.
 
-=item panic: ck_grep
+=item panic: ck_grep, type=%u
 
 (P) Failed an internal consistency check trying to compile a grep.
 
-=item panic: ck_split
+=item panic: ck_split, type=%u
 
 (P) Failed an internal consistency check trying to compile a split.
 
-=item panic: corrupt saved stack index
+=item panic: corrupt saved stack index %ld
 
 (P) The savestack was requested to restore more localized values than
 there are in the savestack.
@@ -3549,7 +3562,7 @@ failure was caught.
 
 (P) The library function frexp() failed, making printf("%f") impossible.
 
-=item panic: goto
+=item panic: goto, type=%u, ix=%ld
 
 (P) We popped the context stack to a context with the specified label,
 and then discovered it wasn't a context we know how to do a goto in.
@@ -3561,11 +3574,11 @@ repeatedly, but each time something re-created entries in the glob.
 Most likely the glob contains an object with a reference back to
 the glob and a destructor that adds a new object to the glob.
 
-=item panic: INTERPCASEMOD
+=item panic: INTERPCASEMOD, %s
 
 (P) The lexer got into a bad state at a case modifier.
 
-=item panic: INTERPCONCAT
+=item panic: INTERPCONCAT, %s
 
 (P) The lexer got into a bad state parsing a string with brackets.
 
@@ -3573,7 +3586,7 @@ the glob and a destructor that adds a new object to the glob.
 
 (F) forked child returned an incomprehensible message about its errno.
 
-=item panic: last
+=item panic: last, type=%u
 
 (P) We popped the context stack to a block context, and then discovered
 it wasn't a block context.
@@ -3583,7 +3596,7 @@ it wasn't a block context.
 (P) A writable lexical variable became read-only somehow within the
 scope.
 
-=item panic: leave_scope inconsistency
+=item panic: leave_scope inconsistency %u
 
 (P) The savestack probably got out of sync.  At least, there was an
 invalid enum on the top of it.
@@ -3593,7 +3606,7 @@ invalid enum on the top of it.
 (P) Failed an internal consistency check while trying to reset all weak
 references to an object.
 
-=item panic: malloc
+=item panic: malloc, %s
 
 (P) Something requested a negative number of bytes of malloc.
 
@@ -3601,12 +3614,12 @@ references to an object.
 
 (P) Something tried to allocate more memory than possible.
 
-=item panic: pad_alloc
+=item panic: pad_alloc, %p!=%p
 
 (P) The compiler got confused about which scratch pad it was allocating
 and freeing temporaries and lexicals from.
 
-=item panic: pad_free curpad
+=item panic: pad_free curpad, %p!=%p
 
 (P) The compiler got confused about which scratch pad it was allocating
 and freeing temporaries and lexicals from.
@@ -3615,7 +3628,7 @@ and freeing temporaries and lexicals from.
 
 (P) An invalid scratch pad offset was detected internally.
 
-=item panic: pad_reset curpad
+=item panic: pad_reset curpad, %p!=%p
 
 (P) The compiler got confused about which scratch pad it was allocating
 and freeing temporaries and lexicals from.
@@ -3624,7 +3637,7 @@ and freeing temporaries and lexicals from.
 
 (P) An invalid scratch pad offset was detected internally.
 
-=item panic: pad_swipe curpad
+=item panic: pad_swipe curpad, %p!=%p
 
 (P) The compiler got confused about which scratch pad it was allocating
 and freeing temporaries and lexicals from.
@@ -3633,7 +3646,7 @@ and freeing temporaries and lexicals from.
 
 (P) An invalid scratch pad offset was detected internally.
 
-=item panic: pp_iter
+=item panic: pp_iter, type=%u
 
 (P) The foreach iterator got called in a non-loop context frame.
 
@@ -3642,11 +3655,11 @@ and freeing temporaries and lexicals from.
 (P) The internal pp_match() routine was called with invalid operational
 data.
 
-=item panic: pp_split
+=item panic: pp_split, pm=%p, s=%p
 
 (P) Something terrible went wrong in setting up for the split.
 
-=item panic: realloc
+=item panic: realloc, %s
 
 (P) Something requested a negative number of bytes of realloc.
 
@@ -3655,17 +3668,17 @@ data.
 (P) The internal sv_replace() function was handed a new SV with a
 reference count other than 1.
 
-=item panic: restartop
+=item panic: restartop in %s
 
 (P) Some internal routine requested a goto (or something like it), and
 didn't supply the destination.
 
-=item panic: return
+=item panic: return, type=%u
 
 (P) We popped the context stack to a subroutine or eval context, and
 then discovered it wasn't a subroutine or eval context.
 
-=item panic: scan_num
+=item panic: scan_num, %s
 
 (P) scan_num() got called on something that wasn't a number.
 
@@ -3674,7 +3687,7 @@ then discovered it wasn't a subroutine or eval context.
 (P) The sv_chop() routine was passed a position that is not within the
 scalar's string buffer.
 
-=item panic: sv_insert
+=item panic: sv_insert, midend=%p, bigend=%p
 
 (P) The sv_insert() routine was told to remove more string than there
 was string.
@@ -3704,7 +3717,7 @@ to even) byte length.
 (P) Something tried to call utf16_to_utf8_reversed with an odd (as opposed
 to even) byte length.
 
-=item panic: yylex
+=item panic: yylex, %s
 
 (P) The lexer got into a bad state while processing a case modifier.
 
@@ -5226,6 +5239,11 @@ where the problem was discovered.  See L<perlre>.
 same length as the replacelist.  See L<perlop> for more information
 about the /d modifier.
 
+=item Useless use of \E
+
+(W misc) You have a \E in a double-quotish string without a C<\U>,
+C<\L> or C<\Q> preceding it.
+
 =item Useless use of %s in void context
 
 (W void) You did something without a side effect in a context that does