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":
C:\_32\pscrpt>type TieFoo.pm package TieFoo; sub TIESCALAR { my $obj = "foo1"; return bless(\$obj, "TieFoo"); } sub FETCH { ${ $_[0] }++; } 1; C:\_32\pscrpt>type demo.pl use Devel::Peek; use lib '.'; use TieFoo; tie $a, 'TieFoo'; print "Initial State: \n"; Dump $a; print "\nFirst Value: $a\n\n"; print "State after a FETCH: \n"; Dump $a;
On perl-5.16, the final Dump() begins:
State after a FETCH: SV = PVMG(0x1cd4f9c) at 0x1cdf054 REFCNT = 1 FLAGS = (GMG,SMG,RMG,pPOK) ...
On later versions of perl that changes to:
State after a FETCH: SV = PVMG(0x7deea8) at 0x7cbc58 REFCNT = 1 FLAGS = (GMG,SMG,RMG,POK,IsCOW,pPOK) ....
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 reply to Re: what does private/public data mean in Devel::Peek by syphilis
in thread what does private/public data mean in Devel::Peek by xiaoyafeng

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.