Re: MAGIC on PADNAMEs; and PADNAMEs as SVs

[email protected] (Dave Mitchell) Wed, 1 Apr 2026 10:57:10 +0100
Newsgroups perl.perl5.porters
Message-ID <[email protected]>
On Tue, Mar 31, 2026 at 04:08:39PM +0100, Paul "LeoNerd" Evans wrote:
> I think I've gone on long enough here, so I'll end with a quick outline
> of a suggested plan of action, and see if anyone disagrees with my
> thinking:
> 
>   1) Create two new dedicated SV types for PADNAME and PADLIST

I haven't thought about it deeply, but my gut instinct is to keep the
PADLIST as is, and change the struct padname such that it keeps most of
its specialist fields, but adds an SV pointer field. The SV is an ordinary
SVPV containing the lexical's name andto which magic can be attached. The
extra stuff, such as min and max seq ranges, which used to be very
awkwardly stuffed into the IV field of the name SV, remain in the struct
padname.

I really don't want us to have extra SV types for such specialist roles,
if possible.