Don't ask to ask, just ask | |
PerlMonks |
Re^5: Introspecting type informations? HvNAME(SvSTASH(SvRV(ST(0))))by roboticus (Chancellor) |
on Aug 04, 2019 at 16:04 UTC ( [id://11103861]=note: print w/replies, xml ) | Need Help?? |
LanX: In the page you linked, it looks like lines 1612 and 1613 (inside subroutine maybe_my) fetch the information from the PAD if it's a typed PAD:
I didn't dig any further into it because it looks like the right thing. Hopefully that'll get you on the trail to the info you're looking for. Note: I got lucky when looking for it, as I first did a ^F in the browser looking for my, but it indicated over 1000 results. However, it also added highlights, drawing my attention to the first item: OPpTARGET_MY. Changing the search to _my gave a mere 6 locations, and the third one shows where the type name gets added to the "my TYPE VAR" output for Deparse. Had it not done so, it may have taken a while to dig it up. ...roboticus When your only tool is a hammer, all problems look like your thumb.
In Section
Seekers of Perl Wisdom
|
|