in reply to Re: how get stash name of SV?
in thread how to get stash name of SV?

So If I understand correctly, the name of SvSTASH is a little bit misleading. it should be SvCLASS or not SvSTASH?




I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

Replies are listed 'Best First'.
Re^3: how get stash name of SV?
by dave_the_m (Monsignor) on Oct 12, 2019 at 11:04 UTC
    So If I understand correctly, the name of SvSTASH is a little bit misleading. it should be SvCLASS or not SvSTASH
    In an ideal world, perhaps yes.

    Dave.

Re^3: how get stash name of SV?
by jcb (Parson) on Oct 14, 2019 at 00:28 UTC

    I suspect that the choice of name for that field is related to how Perl 5 objects are implemented internally: an object uses some package (internally represented as a "stash", which is a hash storing typeglobs) as its vtable. Perl does not really have classes as distinct objects, so the name SvSTASH doubtless made perfect sense when the feature was added to what became Perl 5.