Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: what does private/public data mean in Devel::Peekby syphilis (Archbishop) |
on Aug 09, 2019 at 05:19 UTC ( [id://11104212]=note: print w/replies, xml ) | Need Help?? |
But what does it really mean? The POK flag indicates that the stored PV is valid and can be used. The pPOK flag is used internally by the magic system to establish that the PV is valid. (And similarly for "I" and "N".) I don't know if it's still the case that one can be set without the other. I found an example in section 4.3 of "Extending and Embedding Perl" by Jenness and Cousins that sets pPOK without setting POK - but only on perl-5.16 and perhaps (unchecked) earlier perl versions. On perl-5.18 and later the same code sets both POK and pPOK. Obviously there's no need for both unless they sometimes need to be set by themselves. Here's that demo from "Extending and Embedding Perl": On perl-5.16, the final Dump() begins: On later versions of perl that changes to: According to Jenness and Cousins, that pPOK indicates that a cached value is available (though that cached value gets overwritten with every FETCH). Sorry - probably not much help. Hopefully there's someone kicking around that can do better. Cheers, Rob
In Section
Seekers of Perl Wisdom
|
|