summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-12-16 09:25:30 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-12-16 09:54:17 -0800
commitfc7debfb01ac69b2164761b2dce72408a865197e (patch)
treef06ba7b49ab86cb117d743f5e06b934cba5de9df /pod
parentf4912a505dea4e7cb15f15e044af09ad225528df (diff)
downloadperl-fc7debfb01ac69b2164761b2dce72408a865197e.tar.gz
[perl #91514] Use correct error msg for default
This commit not only mentions default (as opposed to when) in the error message about it being outside a topicalizer, but also normalises those error messages, making them consistent with continue and other loop controls. It also makes the perldiag entry for when actually match the error message.
Diffstat (limited to 'pod')
-rw-r--r--pod/perldiag.pod21
1 files changed, 14 insertions, 7 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 6f0a77f99e..923a81172b 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -682,6 +682,13 @@ quotas or other plumbing problems.
(F) Only scalar, array, and hash variables may be declared as "my", "our" or
"state" variables. They must have ordinary identifiers as names.
+=item Can't "default" outside a topicalizer
+
+(F) You have used a C<default> block that is neither inside a
+C<foreach> loop nor a C<given> block. (Note that this error is
+issued on exit from the C<default> block, so you won't get the
+error if you use an explicit C<continue>.)
+
=item Can't do inplace edit: %s is not a regular file
(S inplace) You tried to use the B<-i> switch on a special file, such as
@@ -1225,18 +1232,18 @@ expression pattern. Trying to do this in ordinary Perl code produces a
value that prints out looking like SCALAR(0xdecaf). Use the $1 form
instead.
-=item Can't use "when" outside a topicalizer
-
-(F) You have used a when() block that is neither inside a C<foreach>
-loop nor a C<given> block. (Note that this error is issued on exit
-from the C<when> block, so you won't get the error if the match fails,
-or if you use an explicit C<continue>.)
-
=item Can't weaken a nonreference
(F) You attempted to weaken something that was not a reference. Only
references can be weakened.
+=item Can't "when" outside a topicalizer
+
+(F) You have used a when() block that is neither inside a C<foreach>
+loop nor a C<given> block. (Note that this error is issued on exit
+from the C<when> block, so you won't get the error if the match fails,
+or if you use an explicit C<continue>.)
+
=item Can't x= to read-only value
(F) You tried to repeat a constant value (often the undefined value)