develooper Front page | perl.perl5.porters | Postings from November 2010

Re: [PATCH] APIify scope() and mod()

Thread Previous
From:
Reini Urban
Date:
November 1, 2010 05:54
Subject:
Re: [PATCH] APIify scope() and mod()
Message ID:
AANLkTinntBtm2yS_s5gNG6TZqxD+eH8egbM_VBWqj7MH@mail.gmail.com
2010/10/27 Father Chrysostomos <sprout@cpan.org>:
> Zefram wrote:
>> Attached patch puts two more op manipulation functions that are going
>> to be required by syntax plugins into the API.
>
> Thank you. Applied as 3ad73efd7b04b72db7f9f29e241e3ed4b806e132.

I find the original documentation vastly superior to the new one.
Cannot we have the examples back in?

diff --git a/op.c b/op.c
index cfa9d6b..1502628 100644
--- a/op.c
+++ b/op.c

-/* Propagate lvalue ("modifiable") context to an op and its children.
- * 'type' represents the context type, roughly based on the type of op that
- * would do the modifying, although local() is represented by OP_NULL.
- * It's responsible for detecting things that can't be modified,  flag
- * things that need to behave specially in an lvalue context (e.g., "$$x = 5"
- * might have to vivify a reference in $x), and so on.
- *
- * For example, "$a+1 = 2" would cause mod() to be called with o being
- * OP_ADD and type being OP_SASSIGN, and would output an error.
- */
+/*
+=for apidoc Amx|OP *|op_lvalue|OP *o|I32 type
+
+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>.
+
+=cut
+*/


Also, cannot we keep mod as deprecated API for one deprecation cycle?
EXp	|OP*	|mod		|NULLOK OP* o|I32 type
-- 
Reini Urban
http://phpwiki.org/           http://murbreak.at/

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About