develooper Front page | perl.perl5.porters | Postings from January 2019

[perl #133755] Document readpipe relation to qx// operator

From:
Tony Cook via RT
Date:
January 24, 2019 00:16
Subject:
[perl #133755] Document readpipe relation to qx// operator
Message ID:
rt-4.0.24-19950-1548288968-1102.133755-15-0@perl.org
On Tue, 15 Jan 2019 22:08:58 -0800, grinnz@gmail.com wrote:
> On Tue, 15 Jan 2019 20:58:01 -0800, tonyc wrote:
> > > One important distinction between qx// and readpipe is
> > > that qx// performs string interpolation, I'm not sure if that's
> > > worth
> > > mentioning here.
> >
> > I'm not sure.
> >
> > Both:
> >
> > readpipe "cat $x"
> >
> > and
> >
> > `cat $x`
> >
> > compile down to the same op-tree, which is why I suggested they were
> > the same, but I guess it's different from the user POV :)
> 
> Aside from it being dependent on how the user creates the arguments to
> the readpipe function, it's also notable because until it was fixed in
> 5.20, defining a readpipe override caused the interpolation to be
> skipped: https://rt.perl.org/Ticket/Display.html?id=115330

That was an ugly bug.  Thanks for the reference.

It's been fixed, so I don't think it's an issue for the documentation for perl 5.30.

Closing.

Tony


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=133755



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