FLAGS = (PADMY,IOK,pIOK)
FLAGS = (PADMY,IOK,POK,pIOK,pPOK)
Because in the first Dump() call, $a didn't have a string in it. No POK flag. A scalar with all its data/content flags off (PADMY has nothing to do with data in the scalar), is undefined and the IV/NV/PV values, if allocated, are allocated but uninitialized memory at that point. The SV type, here PVIV, indicates what is allocated, but not what is currently in use. An undefined SV can be a SVt_PVMG or SVt_PVLV (largest scalar possible, after LV, the SV is not a Perl language Scalar anymore and any attempts to use a SV bigger than SVt_PVLV as a Perl Scalar will result in "bizarre copy of" panics), yet have no magic or Lvalueness attached. An undefined SV can be SVt_NULL, which has almost nothing allocated except the SV struct. I hope youve read atleast the first 1/3rd of illguts. Devel::Peek will show allocated but uninitialized data sometimes as a diagnostic tool so you can figure out if there is a mistake in the flags and the data is actually valid and you forgot a SvIOK_only when creating a IV SV the long way (sv_setiv is the short way). I'm not sure if the advanced fields of magic and LVs are shown if the SV isn't flagged as magic or LV by Devel::Peek.

In reply to Re: PV value by bulk88
in thread PV value by vmani_2012

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.