Restore mmap function (broken by tweaks to shared buffer
[p5sagit/p5-mst-13.2.git] / pod / perldiag.pod
index 83a02b2..830faab 100644 (file)
@@ -59,6 +59,17 @@ L<perlfunc/accept>.
 (F) The '!' is allowed in pack() and unpack() only after certain types.
 See L<perlfunc/pack>.
 
+=item Ambiguous -%c() resolved as a file test
+
+(W ambiguous) You used a "-" right in front a call to a subroutine
+that has the same name as a Perl file test (C<r w x o R W X O e z s
+f d l p S u g k b c t T B M A C>).
+
+To disambiguate it as a subroutine call, use either an extra space after
+the "-", C<- f(...)>, or an extra set of parentheses, C<-(f(...))>.
+To disambiguate it as a file test, use an extra space after the operator
+name C<-f (...)>, or add the space and remove the parentheses, C<-f ...>.
+
 =item Ambiguous call resolved as CORE::%s(), qualify as such or use &
 
 (W ambiguous) A subroutine you have declared has the same name as a Perl
@@ -182,6 +193,11 @@ spots.  This is now heavily deprecated.
 must either both be scalars or both be lists.  Otherwise Perl won't
 know which context to supply to the right side.
 
+=item Negative offset to vec in lvalue context
+
+(F) When vec is called in an lvalue context, the second argument must be
+greater than or equal to zero.
+
 =item Attempt to bless into a reference
 
 (F) The CLASSNAME argument to the bless() operator is expected to be
@@ -444,12 +460,6 @@ L<perlfunc/pack>.
 (F) Only hard references may be blessed.  This is how Perl "enforces"
 encapsulation of objects.  See L<perlobj>.
 
-=item Can't break at that line
-
-(S internal) A warning intended to only be printed while running within
-the debugger, indicating the line number specified wasn't the location
-of a statement that could be stopped at.
-
 =item Can't call method "%s" in empty package "%s"
 
 (F) You called a method correctly, and it correctly indicated a package
@@ -563,10 +573,10 @@ C<-i.bak>, or some such.
 characters and Perl was unable to create a unique filename during
 inplace editing with the B<-i> switch.  The file was ignored.
 
-=item Can't do {n,m} with n > m at <HERE< in regex m/%s/
+=item Can't do {n,m} with n > m before << HERE in regex m/%s/
 
 (F) Minima must be less than or equal to maxima. If you really want your
-regexp to match something 0 times, just put {0}. The <HERE< shows in the
+regexp to match something 0 times, just put {0}. The << HERE shows in the
 regular expression about where the problem was discovered. See L<perlre>.
 
 =item Can't do setegid!
@@ -652,6 +662,13 @@ If you're getting this error from a here-document, you may have included
 unseen whitespace before or after your closing tag. A good programmer's
 editor will have a way to help you find these characters.
 
+=item Can't find %s property definition %s 
+
+(F) You may have tried to use C<\p> which means a Unicode property for
+example \p{Lu} is all uppercase letters.  Escape the C<\p>, either
+C<\\p> (just the C<\p>) or by C<\Q\p> (the rest of the string, until
+possible C<\E>).
+
 =item Can't fork
 
 (F) A fatal error occurred while trying to fork while opening a
@@ -1087,7 +1104,7 @@ on I<Mastering Regular Expressions>.)
 to check the return value of your socket() call?  See
 L<perlfunc/connect>.
 
-=item constant(%s): %s
+=item Constant(%s)%s: %s
 
 (F) The parser found inconsistencies either while attempting to define
 an overloaded constant, or when trying to find the character name
@@ -1117,8 +1134,8 @@ workarounds.
 
 =item Copy method did not return a reference
 
-(F) The method which overloads "=" is buggy. See L<overload/Copy
-Constructor>.
+(F) The method which overloads "=" is buggy. See 
+L<overload/Copy Constructor>.
 
 =item CORE::%s is not a keyword
 
@@ -1385,10 +1402,10 @@ 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?
 
-=item Quantifier follows nothing at <HERE< in regex m/%s/
+=item Quantifier follows nothing before << HERE in regex m/%s/
 
 (F) You started a regular expression with a quantifier. Backslash it if you
-meant it literally. The <HERE< shows in the regular expression about where the
+meant it literally. The << HERE shows in the regular expression about where the
 problem was discovered. See L<perlre>.
 
 =item Format not terminated
@@ -1623,16 +1640,6 @@ C<$ENV{ENV}> or C<$ENV{BASH_ENV}> are derived from data supplied (or
 potentially supplied) by the user.  The script must set the path to a
 known value, using trustworthy data.  See L<perlsec>.
 
-=item In string, @%s now must be written as \@%s
-
-(F) It used to be that Perl would try to guess whether you wanted an
-array interpolated or a literal @.  It did this when the string was
-first used at runtime.  Now strings are parsed at compile time, and
-ambiguous instances of @ must be disambiguated, either by prepending a
-backslash to indicate a literal, or by declaring (or using) the array
-within the program before the string (lexically).  (Someday it will
-simply assume that an unbackslashed @ interpolates an array.)
-
 =item Integer overflow in %s number
 
 (W overflow) The hexadecimal, octal or binary number you have specified
@@ -1645,10 +1652,10 @@ transparently promotes all numbers to a floating point representation
 internally--subject to loss of precision errors in subsequent
 operations.
 
-=item Internal disaster at <HERE< in regex m/%s/
+=item Internal disaster before << HERE in regex m/%s/
 
 (P) Something went badly wrong in the regular expression parser.
-The <HERE< shows in the regular expression about where the problem was
+The << HERE shows in the regular expression about where the problem was
 discovered.
 
 
@@ -1661,9 +1668,9 @@ L<perlvms/"exec LIST">).  Somehow, this count has become scrambled, so
 Perl is making a guess and treating this C<exec> as a request to
 terminate the Perl script and execute the specified command.
 
-=item Internal urp at <HERE< in regex m/%s/
+=item Internal urp before << HERE in regex m/%s/
 
-(P) Something went badly awry in the regular expression parser. The <HERE<
+(P) Something went badly awry in the regular expression parser. The <<<HERE
 shows in the regular expression about where the problem was discovered.
 
 
@@ -1671,8 +1678,8 @@ shows in the regular expression about where the problem was discovered.
 
 (W syntax) You've run afoul of the rule that says that any list operator
 followed by parentheses turns into a function, with all the list
-operators arguments found inside the parentheses.  See L<perlop/Terms
-and List Operators (Leftward)>.
+operators arguments found inside the parentheses.  See 
+L<perlop/Terms and List Operators (Leftward)>.
 
 =item Invalid %s attribute: %s
 
@@ -1724,6 +1731,16 @@ silently ignored.
 (F) Your machine apparently doesn't implement ioctl(), which is pretty
 strange for a machine that supports C.
 
+=item `%s' is not a code reference
+
+(W) The second (fourth, sixth, ...) argument of overload::constant needs
+to be a code reference. Either an anonymous subroutine, or a reference
+to a subroutine.
+
+=item `%s' is not an overloadable type
+
+(W) You tried to overload a constant type the overload package is unaware of.
+
 =item junk on end of regexp
 
 (P) The regular expression parser is confused.
@@ -1769,12 +1786,12 @@ instead on the filehandle.)
 values cannot be returned in subroutines used in lvalue context.  See
 L<perlsub/"Lvalue subroutines">.
 
-=item Lookbehind longer than %d not implemented at <HERE< in reges m/%s/
+=item Lookbehind longer than %d not implemented before << HERE in reges m/%s/
 
 (F) There is currently a limit on the length of string which lookbehind can
-handle. This restriction may be eased in a future release. The <HERE< shows in
+handle. This restriction may be eased in a future release. The << HERE shows in
 the regular expression about where the problem was discovered.
-       
+
 =item Malformed PERLLIB_PREFIX
 
 (F) An error peculiar to OS/2.  PERLLIB_PREFIX should be of the form
@@ -1790,6 +1807,10 @@ a builtin library search path, prefix2 is substituted.  The error may
 appear if components are not found, or are too long.  See
 "PERLLIB_PREFIX" in L<perlos2>.
 
+=item Malformed UTF-8 character (%s)
+
+Perl detected something that didn't comply with UTF-8 encoding rules.
+
 =item Malformed UTF-16 surrogate
 
 Perl thought it was reading UTF-16 encoded character data but while
@@ -1881,6 +1902,14 @@ catches that.  But an easy way to do the same thing is:
 
 Another way is to assign to a substr() that's off the end of the string.
 
+Yet another way is to assign to a C<foreach> loop I<VAR> when I<VAR>
+is aliased to a constant in the look I<LIST>:
+
+        $x = 1;
+        foreach my $n ($x, 2) {
+            $n *= 2; # modifies the $x, but fails on attempt to modify the 2
+        } 
+
 =item Modification of non-creatable array value attempted, %s
 
 (F) You tried to make an array value spring into existence, and the
@@ -1951,10 +1980,10 @@ provided for this purpose.
 (F) You tried to do a read/write/send/recv operation with a buffer
 length that is less than 0.  This is difficult to imagine.
 
-=item Nested quantifiers at <HERE< in regex m/%s/
+=item Nested quantifiers before << HERE in regex m/%s/
 
 (F) You can't quantify a quantifier without intervening parentheses. So
-things like ** or +* or ?* are illegal. The <HERE< shows in the regular
+things like ** or +* or ?* are illegal. The << HERE shows in the regular
 expression about where the problem was discovered.
 
 Note, however, that the minimal matching quantifiers, C<*?>, C<+?>, and
@@ -2239,6 +2268,11 @@ L<perlport> for more on portability concerns.
 
 See also L<perlport> for writing portable code.
 
+=item Odd number of arguments for overload::constant
+
+(W) The call to overload::constant contained an odd number of arguments.
+The arguments should come in pairs.
+
 =item Odd number of elements in hash assignment
 
 (W misc) You specified an odd number of elements to initialize a hash,
@@ -2313,7 +2347,8 @@ The request was judged to be small, so the possibility to trap it
 depends on the way perl was compiled.  By default it is not trappable.
 However, if compiled for this, Perl may use the contents of C<$^M> as an
 emergency pool after die()ing with this message.  In this case the error
-is trappable I<once>.
+is trappable I<once>, and the error message will include the line and file
+where the failed request happened.
 
 =item Out of memory during ridiculously large request
 
@@ -2551,13 +2586,23 @@ C<sh>-shell in.  See "PERL_SH_DIR" in L<perlos2>.
 
 Exactly what were the failed locale settings varies.  In the above the
 settings were that the LC_ALL was "En_US" and the LANG had no value.
-This error means that Perl detected that you and/or your system
-administrator have set up the so-called variable system but Perl could
-not use those settings.  This was not dead serious, fortunately: there
-is a "default locale" called "C" that Perl can and will use, the script
-will be run.  Before you really fix the problem, however, you will get
-the same error message each time you run Perl.  How to really fix the
-problem can be found in L<perllocale> section B<LOCALE PROBLEMS>.
+This error means that Perl detected that you and/or your operating
+system supplier and/or system administrator have set up the so-called
+locale system but Perl could not use those settings.  This was not
+dead serious, fortunately: there is a "default locale" called "C" that
+Perl can and will use, the script will be run.  Before you really fix
+the problem, however, you will get the same error message each time
+you run Perl.  How to really fix the problem can be found in
+L<perllocale> section B<LOCALE PROBLEMS>.
+
+=item perlio: unknown layer "%s"
+
+(S) 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 Permission denied
 
@@ -2720,13 +2765,13 @@ in L<perlos2>.
 (S unsafe) The subroutine being declared or defined had previously been
 declared or defined with a different function prototype.
 
-=item Quantifier in {,} bigger than %d at <HERE< in regex m/%s/
+=item Quantifier in {,} bigger than %d before << HERE in regex m/%s/
 
 (F) There is currently a limit to the size of the min and max values of the
-{min,max} construct. The <HERE< shows in the regular expression about where
+{min,max} construct. The << HERE shows in the regular expression about where
 the problem was discovered. See L<perlre>.
 
-=item Quantifier unexpected on zero-length expression at <HERE< in regex m/%s/
+=item Quantifier unexpected on zero-length expression before << HERE in regex m/%s/
 
 (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
@@ -2794,14 +2839,14 @@ Doing so has no effect.
 (W internal) The internal sv_replace() function was handed a new SV with
 a reference count of other than 1.
 
-=item Reference to nonexistant group at <HERE< in regex m/%s/
+=item Reference to nonexistent group before << HERE in regex m/%s/
 
 (F) You used something like C<\7> in your regular expression, but there are
 not at least seven sets of capturing parentheses in the expression. If you
 wanted to have the character with value 7 inserted into the regular expression,
 prepend a zero to make the number at least two digits: C<\07>
 
-The <HERE< shows in the regular expression about where the problem was
+The << HERE shows in the regular expression about where the problem was
 discovered.
 
 =item regexp memory corruption
@@ -2887,6 +2932,11 @@ filehandle that was either never opened or has since been closed.
 
 (F) This machine doesn't implement the select() system call.
 
+=item Self-ties of arrays and hashes are not supported
+
+(F) Self-ties are of arrays and hashes are not supported in
+the current implementation.
+
 =item Semicolon seems to be missing
 
 (W semicolon) A nearby syntax error was probably caused by a missing
@@ -2906,9 +2956,9 @@ scalar that had previously been marked as free.
 (W closed) The socket you're sending to got itself closed sometime
 before now.  Check your logic flow.
 
-=item Sequence (? incomplete at <HERE< mark in regex m/%s/
+=item Sequence (? incomplete before << HERE mark in regex m/%s/
 
-(F) A regular expression ended with an incomplete extension (?. The <HERE<
+(F) A regular expression ended with an incomplete extension (?. The <<<HERE
 shows in the regular expression about where the problem was discovered. See
 L<perlre>.
 
@@ -2917,16 +2967,16 @@ L<perlre>.
 (F) If the contents of a (?{...}) clause contains braces, they must balance
 for Perl to properly detect the end of the clause. See L<perlre>.
 
-=item Sequence (?%s...) not implemented at <HERE< mark in regex m/%s/
+=item Sequence (?%s...) not implemented before << HERE mark in regex m/%s/
 
 (F) A proposed regular expression extension has the character reserved but
-has not yet been written. The <HERE< shows in the regular expression about
+has not yet been written. The << HERE shows in the regular expression about
 where the problem was discovered. See L<perlre>.
 
-=item Sequence (?%s...) not recognized at <HERE< mark in regex m/%s/
+=item Sequence (?%s...) not recognized before << HERE mark in regex m/%s/
 
 (F) You used a regular expression extension that doesn't make sense.
-The <HERE< shows in the regular expression about
+The << HERE shows in the regular expression about
 where the problem was discovered. 
 See L<perlre>.
 
@@ -3114,7 +3164,7 @@ assignment or as a subroutine argument for example).
 (F) Your Perl was compiled with B<-D>SETUID_SCRIPTS_ARE_SECURE_NOW, but
 a version of the setuid emulator somehow got run anyway.
 
-=item Switch (?(condition)... contains too many branches at <HERE< in regex m/%s/
+=item Switch (?(condition)... contains too many branches before << HERE in regex m/%s/
 
 (F) A (?(condition)if-clause|else-clause) construct can have at most two
 branches (the if-clause and the else-clause). If you want one or both to
@@ -3123,13 +3173,13 @@ clustering parentheses:
 
     (?(condition)(?:this|that|other)|else-clause)
 
-The <HERE< shows in the regular expression about where the problem was
+The << HERE shows in the regular expression about where the problem was
 discovered. See L<perlre>.
 
-=item Switch condition not recognized at <HERE< in regex m/%s/
+=item Switch condition not recognized before << HERE in regex m/%s/
 
 (F) If the argument to the (?(...)if-clause|else-clause) construct is a
-number, it can be only a number. The <HERE< shows in the regular expression
+number, it can be only a number. The << HERE shows in the regular expression
 about where the problem was discovered. See L<perlre>.
 
 =item switching effective %s is not implemented
@@ -3219,7 +3269,7 @@ will deny it.
 The function indicated isn't implemented on this architecture, according
 to the probings of Configure.
 
-=item The stat preceding C<-l _> wasn't an lstat
+=item The stat preceding %s wasn't an lstat
 
 (F) It makes no sense to test the current stat buffer for symbolic
 linkhood if the last stat that wrote to the stat buffer already went
@@ -3407,7 +3457,7 @@ representative, who probably put it there in the first place.
 (F) There are no byte-swapping functions for a machine with this byte
 order.
 
-=item Unknown switch condition (?(%.2s at <HERE< in regex m/%s/
+=item Unknown switch condition (?(%.2s before << HERE in regex m/%s/
 
 (F) The condition of a (?(condition)if-clause|else-clause) construct is not
 known. The condition may be lookaround (the condition is true if the
@@ -3415,7 +3465,7 @@ lookaround is true), a (?{...}) construct (the condition is true if the
 code evaluates to a true value), or a number (the condition is true if the
 set of capturing parentheses named by the number is defined).
 
-The <HERE< shows in the regular expression about where the problem was
+The << HERE shows in the regular expression about where the problem was
 discovered.  See L<perlre>.
 
 =item Unknown open() mode '%s'
@@ -3431,14 +3481,14 @@ iterating over it, and someone else stuck a message in the stream of
 data Perl expected.  Someone's very confused, or perhaps trying to
 subvert Perl's population of %ENV for nefarious purposes.
 
-=item unmatched [ at <HERE< mark in regex m/%s/
+=item unmatched [ before << HERE mark in regex m/%s/
 
 (F) The brackets around a character class must match. If you wish to
 include a closing bracket in a character class, backslash it or put it
-first. See L<perlre>. The <HERE< shows in the regular expression about
+first. See L<perlre>. The << HERE shows in the regular expression about
 where the escape was discovered.
 
-=item unmatched ( in regexp at <HERE< mark in regex m/%s/
+=item unmatched ( in regexp before << HERE mark in regex m/%s/
 
 (F) Unbackslashed parentheses must always be balanced in regular
 expressions.  If you're a vi user, the % key is valuable for finding the
@@ -3470,12 +3520,12 @@ script, a binary program, or a directory as a Perl program.
 recognized by Perl inside character classes.  The character was
 understood literally.
 
-=item Unrecognized escape \\%c passed through at <HERE< in m/%s/
+=item Unrecognized escape \\%c passed through before << HERE in m/%s/
 
 (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. The <HERE< shows in the regular expression about where the escape
+literally. The << HERE shows in the regular expression about where the escape
 was discovered.
 
 
@@ -3764,10 +3814,10 @@ anonymous, using the C<sub {}> syntax.  When inner anonymous subs that
 reference variables in outer subroutines are called or referenced, they
 are automatically rebound to the current values of such variables.
 
-=item Variable length lookbehind not implemented at <HERE< in regex m/%s/
+=item Variable length lookbehind not implemented before << HERE in regex 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
+known at compile time. The << HERE shows in the regular expression about where
 the problem was discovered.
 
 =item Version number must be a constant number
@@ -3806,6 +3856,10 @@ but in actual fact, you got
 
 So put in parentheses to say what you really mean.
 
+=item Wide character in %s
+
+(F) Perl met a wide character (>255) when it wasn't expecting one.
+
 =item write() on closed filehandle %s
 
 (W closed) The filehandle you're writing to got itself closed sometime