This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix a typo
[perl5.git] / pod / perldiag.pod
index 75fd758..fd2833a 100644 (file)
@@ -563,6 +563,15 @@ symbol.  Perhaps you need to predeclare a subroutine?
 compiler saw no other uses of that namespace before that point.  Perhaps
 you need to predeclare a package?
 
+=item Bareword filehandle "%s" not allowed under 'no feature "bareword_filehandles"'
+
+(F) You attempted to use a bareword filehandle with the
+C<bareword_filehandles> feature disabled.
+
+Only the built-in handles C<STDIN>, C<STDOUT>, C<STDERR>, C<ARGV>,
+C<ARGVOUT> and C<DATA> can be used with the C<bareword_filehandles>
+feature disabled.
+
 =item BEGIN failed--compilation aborted
 
 (F) An untrapped exception was raised while executing a BEGIN
@@ -2000,12 +2009,12 @@ such as:
 or a hash or array slice, such as:
 
     @foo[$bar, $baz, $xyzzy]
-    @{$ref->[12]}{"susie", "queue"}
+    $ref->[12]->@{"susie", "queue"}
 
 or a hash key/value or array index/value slice, such as:
 
     %foo[$bar, $baz, $xyzzy]
-    %{$ref->[12]}{"susie", "queue"}
+    $ref->[12]->%{"susie", "queue"}
 
 =item Delimiter for here document is too long
 
@@ -3288,8 +3297,11 @@ line.  See L<perlrun|perlrun/-i[extension]> for more details.
 
 =item \K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/%s/
 
-(F) Your regular expression used C<\K> in a lookhead or lookbehind
-assertion, which isn't permitted.
+(F) Your regular expression used C<\K> in a lookahead or lookbehind
+assertion, which currently isn't permitted.
+
+This may change in the future, see L<Support \K in
+lookarounds|https://github.com/Perl/perl5/issues/18134>.
 
 =item Label not found for "last %s"
 
@@ -3409,7 +3421,7 @@ The other common cause is for the characters
 
  $ + < = > ^ ` | ~
 
-These are probematic.  The C standard says that these should be
+These are problematic.  The C standard says that these should be
 considered punctuation in the C locale (and the POSIX standard defers to
 the C standard), and Unicode is generally considered a superset of
 the C locale.  But Unicode has added an extra category, "Symbol", and
@@ -3831,6 +3843,9 @@ is aliased to a constant in the look I<LIST>:
         $n *= 2; # modifies the $x, but fails on attempt to
     }            # modify the 2
 
+L<PerlIO::scalar> will also produce this message as a warning if you
+attempt to open a read-only scalar for writing.
+
 =item Modification of non-creatable array value attempted, %s
 
 (F) You tried to make an array value spring into existence, and the
@@ -3886,6 +3901,17 @@ mutable before freeing the ops.
 
 (F) You don't have System V message IPC on your system.
 
+=item Multidimensional hash lookup is disabled
+
+(F) You supplied a list of subscripts to a hash lookup under
+C<< no feature "multidimensional"; >>, eg:
+
+  $z = $foo{$x, $y};
+
+which by default acts like:
+
+  $z = $foo{join($;, $x, $y)};
+
 =item Multidimensional syntax %s not supported
 
 (W syntax) Multidimensional arrays aren't written like C<$foo[1,2,3]>.
@@ -6290,14 +6316,20 @@ See L<perlunicode/"User-Defined Character Properties">.
 (F) There has to be at least one argument to syscall() to specify the
 system call to call, silly dilly.
 
-=item Too few arguments for subroutine '%s'
+=item Too few arguments for subroutine '%s' (got %d; expected %d)
 
 (F) A subroutine using a signature fewer arguments than required by the
 signature.  The caller of the subroutine is presumably at fault.
 
 The message attempts to include the name of the called subroutine.  If
 the subroutine has been aliased, the subroutine's original name will be
-shown, regardless of what name the caller used.
+shown, regardless of what name the caller used. It will also indicate the
+number of arguments given and the number expected.
+
+=item Too few arguments for subroutine '%s' (got %d; expected at least %d)
+
+Similar to the previous message but for subroutines that accept a variable
+number of arguments.
 
 =item Too late for "-%s" option
 
@@ -6329,14 +6361,20 @@ BEGIN block.
 
 (F) The function requires fewer arguments than you specified.
 
-=item Too many arguments for subroutine '%s'
+=item Too many arguments for subroutine '%s' (got %d; expected %d)
 
 (F) A subroutine using a signature received more arguments than permitted
 by the signature.  The caller of the subroutine is presumably at fault.
 
 The message attempts to include the name of the called subroutine. If the
 subroutine has been aliased, the subroutine's original name will be shown,
-regardless of what name the caller used.
+regardless of what name the caller used. It will also indicate the number
+of arguments given and the number expected.
+
+=item Too many arguments for subroutine '%s' (got %d; expected at most %d)
+
+Similar to the previous message but for subroutines that accept a variable
+number of arguments.
 
 =item Too many nested open parens in regex; marked by <-- HERE in m/%s/