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

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

Thread Previous | Thread Next
Dave Mitchell
December 9, 2021 18:37
Re: "no snails"; or having signatured subs complain about @_
Message ID:
On Thu, Dec 09, 2021 at 05:36:06PM +0000, Paul "LeoNerd" Evans wrote:
> This was the problem though - I couldn't work out how to keep @DB::args
> working in that situation.

A more radical proposition would be to declare that @DB::args will always
return empty for signature subs.

@DB::args has always been broken by design. Due to the stack not being ref
counted, it has a habit of returning freed or reallocated SVs, and will
also do things like return '2' when queried in the middle of this sub

    sub foo { $_[0]++; ... }
    my $i = 1;

We can always add it back later (which is easier than taking it away

This email is confidential, and now that you have read it you are legally
obliged to shoot yourself. Or shoot a lawyer, if you prefer. If you have
received this email in error, place it in its original wrapping and return
for a full refund. By opening this email, you accept that Elvis lives.

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