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

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

Thread Previous
From:
Dave Mitchell
Date:
July 27, 2012 04:50
Subject:
Re: todo: readpipe(LIST) -- what does that mean?
Message ID:
20120727110439.GF2814@iabyn.com
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
it.

(*) 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


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