develooper Front page | perl.perl5.porters | Postings from February 2018

Re: [perl #132810] Blead Breaks CPAN:KYZ/Test-MockCommand-0.03.tar.gz

Thread Previous | Thread Next
From:
Zefram
Date:
February 6, 2018 16:31
Subject:
Re: [perl #132810] Blead Breaks CPAN:KYZ/Test-MockCommand-0.03.tar.gz
Message ID:
20180206163129.GF1696@fysh.org
Leon Timmermans wrote:
>                                 this can be fixed by making it a
>well-behaved listop.

No it can't.  The pre-5.27.7 behaviour puts the argument expression into
scalar context if readpipe() itself is in scalar context.  A well-behaved
list op always puts its arguments into list context, so your proposal
would break any code that relied on the scalar context.

There is no well-behaved treatment of arguments that matches the
pre-5.27.7 treatment of readpipe()'s arguments, even when consideration is
restricted to those cases that didn't break stack discipline.  There is
no prototype that would correspond to that behaviour.

It *is* technically possible to reimplement the old argument handling
deliberately, with some chosen change only to the stack-breaking case.
But it wouldn't qualify as any kind of well-behaved.  It would be a
unique exception to the rules, and the keyword would have to lose its
prototype to avoid being misdescribed by it.

I am still satisfied that making readpipe() the scalar operator that it
was always intended to be was the right way to resolve this.

-zefram

Thread Previous | Thread Next


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