Minor doc patch: handy.h
[p5sagit/p5-mst-13.2.git] / pod / perldiag.pod
index 0196338..baa088c 100644 (file)
@@ -76,6 +76,13 @@ on the operator (e.g. C<CORE::log($x)>) or by declaring the subroutine
 to be an object method (see L<perlsub/"Subroutine Attributes"> or
 L<attributes>).
 
+=item Ambiguous range in transliteration operator
+
+(F) You wrote something like C<tr/a-z-0//> which doesn't mean anything at
+all.  To include a C<-> character in a transliteration, put it either
+first or last.  (In the past, C<tr/a-z-0//> was synonymous with
+C<tr/a-y//>, which was probably not what you would have expected.)
+
 =item Ambiguous use of %s resolved as %s
 
 (W ambiguous)(S) You said something that may not be interpreted the way
@@ -747,6 +754,12 @@ the file, say, by doing C<make install>.
 functioning as a class, but that package doesn't define that particular
 method, nor does any of its base classes.  See L<perlobj>.
 
+=item (perhaps you forgot to load "%s"?)
+
+(F) This is an educated guess made in conjunction with the message
+"Can't locate object method \"%s\" via package \"%s\"".  It often means
+that a method requires a package that has not been loaded.
+
 =item Can't locate package %s for @%s::ISA
 
 (W syntax) The @ISA array contained the name of another package that
@@ -1018,23 +1031,23 @@ Perhaps you need to copy the value to a temporary, and repeat that.
 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 future
-extensions.
+extensions and will cause fatal errors.
 
 =item Character class syntax [. .] is reserved for future extensions
 
-(W regexp) Within regular expression character classes ([]) the syntax
+(F regexp) Within regular expression character classes ([]) the syntax
 beginning with "[." and ending with ".]" is reserved for future
-extensions.  If you need to represent those character sequences inside a
-regular expression character class, just quote the square brackets with
-the backslash: "\[." and ".\]".
+extensions.  If you need to represent those character sequences inside
+a regular expression character class, just quote the square brackets
+with the backslash: "\[." and ".\]".
 
 =item Character class syntax [= =] is reserved for future extensions
 
-(W regexp) Within regular expression character classes ([]) the syntax
+(F) Within regular expression character classes ([]) the syntax
 beginning with "[=" and ending with "=]" is reserved for future
-extensions.  If you need to represent those character sequences inside a
-regular expression character class, just quote the square brackets with
-the backslash: "\[=" and "=\]".
+extensions.  If you need to represent those character sequences inside
+a regular expression character class, just quote the square brackets
+with the backslash: "\[=" and "=\]".
 
 =item Character class [:%s:] unknown
 
@@ -1075,7 +1088,7 @@ arbitrarily.  ("Simple" and "medium" situations are handled without
 recursion and are not subject to a limit.)  Try shortening the string
 under examination; looping in Perl code (e.g. with C<while>) rather than
 in the regular expression engine; or rewriting the regular expression so
-that it is simpler or backtracks less.  (See L<perlbook> for information
+that it is simpler or backtracks less.  (See L<perlfaq2> for information
 on I<Mastering Regular Expressions>.)
 
 =item connect() on closed socket %s
@@ -1691,6 +1704,11 @@ L<perlfunc/sprintf>.
 (F) The range specified in a character class had a minimum character
 greater than the maximum character.  See L<perlre>.
 
+=item invalid [] range "%s" in transliteration operator
+
+(F) The range specified in the tr/// or y/// operator had a minimum
+character greater than the maximum character.  See L<perlop>.
+
 =item Invalid separator character %s in attribute list
 
 (F) Something other than a colon or whitespace was seen between the
@@ -1768,7 +1786,7 @@ or
 with nonempty prefix1 and prefix2.  If C<prefix1> is indeed a prefix of
 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 F<README.os2>.
+"PERLLIB_PREFIX" in L<perlos2>.
 
 =item %s matches null string many times
 
@@ -1856,13 +1874,13 @@ 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.
 
-=item Modification of non-creatable array value attempted, subscript %d
+=item Modification of non-creatable array value attempted, %s
 
 (F) You tried to make an array value spring into existence, and the
 subscript was probably negative, even counting from end of the array
 backwards.
 
-=item Modification of non-creatable hash value attempted, subscript "%s"
+=item Modification of non-creatable hash value attempted, %s
 
 (P) You tried to make a hash value spring into existence, and it
 couldn't be created for some peculiar reason.
@@ -1871,11 +1889,11 @@ couldn't be created for some peculiar reason.
 
 (F) Only a bare module name is allowed as the first argument to a "use".
 
-=item Module name required with -M option
+=item Module name required with -%c option
 
-(F) The C<-M> option says that Perl should load some module, but you
-omitted the name of the module.  Consult L<perlrun> for full details
-about C<-M>.
+(F) The C<-M> or C<-m> options say that Perl should load some module, but
+you omitted the name of the module.  Consult L<perlrun> for full details
+about C<-M> and C<-m>.
 
 =item msg%s not implemented
 
@@ -2493,7 +2511,7 @@ you upgraded, anyway?  See L<perlfunc/require>.
 =item PERL_SH_DIR too long
 
 (F) An error peculiar to OS/2. PERL_SH_DIR is the directory to find the
-C<sh>-shell in.  See "PERL_SH_DIR" in F<README.os2>.
+C<sh>-shell in.  See "PERL_SH_DIR" in L<perlos2>.
 
 =item perl: warning: Setting locale failed.
 
@@ -2641,7 +2659,7 @@ before now.  Check your logic flow.
 applications die in silence.  It is considered a feature of the OS/2
 port.  One can easily disable this by appropriate sighandlers, see
 L<perlipc/"Signals">.  See also "Process terminated by SIGTERM/SIGINT"
-in F<README.os2>.
+in L<perlos2>.
 
 =item Prototype mismatch: %s vs %s
 
@@ -2680,7 +2698,7 @@ which is why it's currently left out of your copy.
 (F) More than 100 levels of inheritance were used.  Probably indicates
 an unintended loop in your inheritance hierarchy.
 
-=item Recursive inheritance detected while looking for method '%s' in package '%s'
+=item Recursive inheritance detected while looking for method %s
 
 (F) More than 100 levels of inheritance were encountered while invoking
 a method.  Probably indicates an unintended loop in your inheritance
@@ -2976,7 +2994,7 @@ quantifier inside the assertion instead.  For example, the way to match
 "abc" provided that it is followed by three repetitions of "xyz" is
 C</abc(?=(?:xyz){3})/>, not C</abc(?=xyz){3}/>.
 
-=item Stub found while resolving method `%s' overloading `%s' in package `%s'
+=item Stub found while resolving method `%s' overloading %s
 
 (P) Overloading resolution over @ISA tree may be broken by importation
 stubs.  Stubs should never be implicitly created, but explicit calls to
@@ -3401,6 +3419,11 @@ Note that under some systems, like OS/2, there may be different flavors
 of Perl executables, some of which may support fork, some not. Try
 changing the name you call Perl by to C<perl_>, C<perl__>, and so on.
 
+=item Unsupported script encoding
+
+(F) Your program file begins with a Unicode Byte Order Mark (BOM) which
+declares it to be in a Unicode encoding that Perl cannot yet read.
+
 =item Unsupported socket function "%s" called
 
 (F) Your machine doesn't support the Berkeley socket mechanism, or at
@@ -3420,6 +3443,12 @@ an attribute list, but the matching closing (right) parenthesis
 character was not found.  You may need to add (or remove) a backslash
 character to get your parentheses to balance.  See L<attributes>.
 
+=item Unterminated compressed integer
+
+(F) An argument to unpack("w",...) was incompatible with the BER
+compressed integer format and could not be converted to an integer.
+See L<perlfunc/pack>.
+
 =item Unterminated <> operator
 
 (F) The lexer saw a left angle bracket in a place where it was expecting
@@ -3546,6 +3575,14 @@ a package qualifier, e.g. C<&our()>, or C<Foo::our()>.
 defined.  It was interpreted as a "" or a 0, but maybe it was a mistake.
 To suppress this warning assign a defined value to your variables.
 
+To help you figure out what was undefined, perl tells you what operation
+you used the undefined value in.  Note, however, that perl optimizes your
+program and the operation displayed in the warning may not necessarily
+appear literally in your program.  For example, C<"that $foo"> is
+usually optimized into C<"that " . $foo>, and the warning will refer to
+the C<concatenation (.)> operator, even though there is no C<.> in your
+program.
+
 =item Value of %s can be "0"; test with defined()
 
 (W misc) In a conditional expression, you used <HANDLE>, <*> (glob),