develooper Front page | perl.perl5.porters | Postings from July 2011

Re: [perl #94980] Incorrect or missing prototypes on core keywords

Thread Previous
July 18, 2011 05:42
Re: [perl #94980] Incorrect or missing prototypes on core keywords
Message ID:
Father Chrysostomos wrote:
>glob has no prototype, but I think it should have (_).

Looks right to me.

>lock has \$, but allows lock %foo, so what should it be?

The argument class is OA_SCALARREF, and its behaviour in ck_fun() is
actually to allow *anything*.  tied() uses that argument class too,
and has prototype (\[$@%*]).  (\[$@%*]) is at least pretty close; are
there any cases that OA_SCALARREF accepts that (\[$@%*]) doesn't?

For those ops whose checker is ck_fun() or ck_rfun(), you should
attempt a mechanical translation of PL_opargs[] to prototypes and see
how that compares against what pp_prototype() yields.  Of course, as a
subtask you'd have to decide the proper prototype rendition of each OA_*
argument class.


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About