Clarify op_lvalue’s docs
authorFather Chrysostomos <sprout@cpan.org>
Fri, 26 Nov 2010 22:51:07 +0000 (14:51 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 26 Nov 2010 22:51:07 +0000 (14:51 -0800)
as requested by Reini Urban [perl #78908]

op.c

diff --git a/op.c b/op.c
index 5346a89..2da3db4 100644 (file)
--- a/op.c
+++ b/op.c
@@ -1420,10 +1420,14 @@ Propagate lvalue ("modifiable") context to an op and its children.
 I<type> represents the context type, roughly based on the type of op that
 would do the modifying, although C<local()> is represented by OP_NULL,
 because it has no op type of its own (it is signalled by a flag on
-the lvalue op).  This function detects things that can't be modified,
-such as C<$x+1>, and generates errors for them.  It also flags things
-that need to behave specially in an lvalue context, such as C<$$x>
-which might have to vivify a reference in C<$x>.
+the lvalue op).
+
+This function detects things that can't be modified, such as C<$x+1>, and
+generates errors for them. For example, C<$x+1 = 2> would cause it to be
+called with an op of type OP_ADD and a C<type> argument of OP_SASSIGN.
+
+It also flags things that need to behave specially in an lvalue context,
+such as C<$$x = 5> which might have to vivify a reference in C<$x>.
 
 =cut
 */