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

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

Thread Previous | Thread Next
Father Chrysostomos via RT
February 5, 2018 16:32
[perl #132810] Blead Breaks CPAN: KYZ/Test-MockCommand-0.03.tar.gz
Message ID:
On Mon, 05 Feb 2018 05:33:20 -0800, LeonT wrote:
> Making it a scalar op is clearly not the only way to restore stack
> sanity (even if it may be the easiest one). It wouldn't have been
> different if this had been done in 1993 when readpipe was added, but
> we're a generation beyond that point.
> * Any solution where passing more or less than one argument doesn't
> cause a warning is not as helpful as it could be.
> * Evaluating to the number of arguments is never useful.
> * Any solution where code that has worked for a generation is suddenly
> no longer working is harmful. Such harm needs to be justified by a
> direct need for that breakage.
> That need doesn't exist, because this can be fixed by making it a
> well-behaved listop. So:
> * if arguments > 1 we should use the last value (as is currently done)
> and warn.
> * if arguments == 0 we should not run anything and warn about it.
> * if arguments == 1, everybody gets pizza.

Yes, that could work.  But do note that no other perl operator works that way, as far as I know.


Father Chrysostomos

via perlbug:  queue: perl5 status: open

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