Front page | perl.perl5.porters |
Postings from December 2019
Re: @_ Suppression
Thread Previous
|
Thread Next
From:
Zefram via perl5-porters
Date:
December 4, 2019 22:02
Subject:
Re: @_ Suppression
Message ID:
20191204220011.ukeda4mjd2xxvh5w@fysh.org
Paul "LeoNerd" Evans wrote:
>look at (I believe) @DB::args though the exact logic confuses me. Will
>that remain working here?
Ooh, this turns out to be more interesting than it first seemed.
Obviously we'd want @DB::args to still be populated: it's still a
useful facility, and logically the concept of "the arguments with which
the subroutine was invoked" (as stated in the caller() doc) applies
just as well regardless of whether those arguments went into an @_.
But the implementation in pp_caller() is very tied up with @_, actually
referring to the AV that serves as the sub's @_. (Some, but not all,
alterations to @_ affect what shows up in @DB::args.) This wouldn't
work with @_ suppression. It'll be necessary to implement a new way
for context stack frames to refer to a sub's arguments; probably just
pointing to them on the stack.
-zefram
Thread Previous
|
Thread Next