develooper Front page | perl.perl5.porters | Postings from December 2021

Re: "no snails"; or having signatured subs complain about @_

Thread Previous | Thread Next
Paul "LeoNerd" Evans
December 9, 2021 20:49
Re: "no snails"; or having signatured subs complain about @_
Message ID:
On Thu, 09 Dec 2021 21:45:13 +0100
Tomasz Konojacki <> wrote:

> On Thu, 9 Dec 2021 20:32:10 +0000
> Dave Mitchell <> wrote:
> > So by your logic, we're not allowed to change the behaviour of @_ in
> > signature subs (the main thrust of this thread)?  
> As I said in the "getting signatures out of experimental" thread, I'm
> OK with @_ removal because I don't consider it a dramatic change.
> Overwhelming majority of signatured subs don't use @_ and those that
> do can be modified to stop using it.

Having read the prior arguments, I'm kinda with Dave on this one.
@DB::args is already shockingly broken in a lot of ways. Making it
always appear empty when called within a signatured sub is, honestly,
not the worst of its already-current breakages.

> If there was an alternative to @DB::args, my stance on its removal
> would've been different.

Perhaps we need to create a better replacement, then. A new function
(*function*, not weird side-effect of a variable being populated when a
core op is called from a specifically-named caller package) whose
presence indicates "hey perl, don't throw away args from the stack, but
remember them". This can then act as a far more reliable interface onto
the arguments, however they are implemented.

Paul "LeoNerd" Evans      |  |

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