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

Re: todo: readpipe(LIST) -- what does that mean?

Thread Previous
Dave Mitchell
July 27, 2012 04:50
Re: todo: readpipe(LIST) -- what does that mean?
Message ID:
On Thu, Jul 26, 2012 at 07:43:25AM -0600, Darin McBride wrote:
> Maybe from what you're saying I can "just" look at changing readpipe's 
> prototype and then dealing with it in Perl_pp_backtick.

You would have to change pp_backtick such that it expects a list of
arguments on the stack, not just a single arg.

You would have to change the parser so that qx'...' generates a
pushmark(*) op in addition to the op(s) that push the single arg on the
stack; and the prototype of readpipe would need to change to make it into
a list op.

Note that I'm not endorsing here whether this is a good change for
readpipe (making it a list op), I'm just saying how you might implement

(*) alternately it might be possible to add a flag to pp_backtick to
indicate that it has a list of args rather than a single one, in which
case the parsing of qx'' doesn't need to change.

Nothing ventured, nothing lost.

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