summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-07-27 10:46:26 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-07-27 10:51:04 -0700
commit2ba1f20ac3ac18b441a222cea2b0bbf6f3588c7d (patch)
tree65b642b8cfec178f82d9dbcb8cc62a9d88e9b6b6 /pod
parente52de15a297bcbe6fac509aef6b35095923fa7d0 (diff)
downloadperl-2ba1f20ac3ac18b441a222cea2b0bbf6f3588c7d.tar.gz
[perl #113684] Document actual prec of loop exits
These have always* had assignment precedence, such that $a = goto $b = $c is equivalent to $a = (goto ($b = $c)) * I haven’t checked before perl 5.
Diffstat (limited to 'pod')
-rw-r--r--pod/perlcheat.pod2
-rw-r--r--pod/perlfunc.pod25
-rw-r--r--pod/perlop.pod2
3 files changed, 27 insertions, 2 deletions
diff --git a/pod/perlcheat.pod b/pod/perlcheat.pod
index 7fd82f8564..f288692a87 100644
--- a/pod/perlcheat.pod
+++ b/pod/perlcheat.pod
@@ -42,7 +42,7 @@ already be overwhelming.
|| // /m line based ^$ $ str end (bfr \n)
.. ... /s . includes \n + one or more
?: /x ignore wh.space * zero or more
- = += -= *= etc /p preserve ? zero or one
+ = += last goto /p preserve ? zero or one
, => /a ASCII /aa safe {3,7} repeat in range
list ops /l locale /d dual | alternation
not /u Unicode [] character class
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 8e8bccaa25..b1cc605f3d 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -1620,6 +1620,11 @@ convert a core file into an executable. That's why you should now invoke
it as C<CORE::dump()>, if you don't want to be warned against a possible
typo.
+Unlike most named operators, this has the same precedence as assignment.
+It is also exempt from the looks-like-a-function rule, so
+C<dump ("foo")."bar"> will cause "bar" to be part of the argument to
+C<dump>.
+
Portability issues: L<perlport/dump>.
=item each HASH
@@ -2917,6 +2922,11 @@ NAME needn't be the name of a subroutine; it can be a scalar variable
containing a code reference or a block that evaluates to a code
reference.
+Unlike most named operators, this has the same precedence as assignment.
+It is also exempt from the looks-like-a-function rule, so
+C<goto ("foo")."bar"> will cause "bar" to be part of the argument to
+C<goto>.
+
=item grep BLOCK LIST
X<grep>
@@ -3237,6 +3247,11 @@ exit out of such a block.
See also L</continue> for an illustration of how C<last>, C<next>, and
C<redo> work.
+Unlike most named operators, this has the same precedence as assignment.
+It is also exempt from the looks-like-a-function rule, so
+C<last ("foo")."bar"> will cause "bar" to be part of the argument to
+C<last>.
+
=item lc EXPR
X<lc> X<lowercase>
@@ -3754,6 +3769,11 @@ that executes once. Thus C<next> will exit such a block early.
See also L</continue> for an illustration of how C<last>, C<next>, and
C<redo> work.
+Unlike most named operators, this has the same precedence as assignment.
+It is also exempt from the looks-like-a-function rule, so
+C<next ("foo")."bar"> will cause "bar" to be part of the argument to
+C<next>.
+
=item no MODULE VERSION LIST
X<no declarations>
X<unimporting>
@@ -5568,6 +5588,11 @@ turn it into a looping construct.
See also L</continue> for an illustration of how C<last>, C<next>, and
C<redo> work.
+Unlike most named operators, this has the same precedence as assignment.
+It is also exempt from the looks-like-a-function rule, so
+C<redo ("foo")."bar"> will cause "bar" to be part of the argument to
+C<redo>.
+
=item ref EXPR
X<ref> X<reference>
diff --git a/pod/perlop.pod b/pod/perlop.pod
index bde763c8b8..b7a1c7b309 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -48,7 +48,7 @@ values only, not array values.
left || //
nonassoc .. ...
right ?:
- right = += -= *= etc.
+ right = += -= *= etc. goto last next redo dump
left , =>
nonassoc list operators (rightward)
right not