Are you asking what the SV is (NULL, BIND, IV, NV, PV, PVIV, PVNV, PVMG, REGEXP, PVGV, PVLV, PVAV, PVHV, PVCV, PVFM, PVIO), what fields the SV has (IV, NV, PV, GP, etc) or which value is present in the SV (IV, UV, NV, PV, RV, GP, private IV, private NV, private PV, etc)?

For example,

$ perl -MDevel::Peek -E'$_ = 2**31; ++$_; say "value: $_"; Dump $_;' value: 2147483649 SV = PVNV(0x8cc0ac8) at 0x8cebef8 REFCNT = 1 FLAGS = (IOK,POK,pIOK,pPOK,IsUV) UV = 2147483649 NV = 2147483648 PV = 0x8cdf378 "2147483649"\0 CUR = 10 LEN = 12

$_ is a PVNV. It has fields IV*, NV and PV. It has UV and PV values.

I find the last most likely. If so, asking the question is surely due to a bad design decision. A PV, IV, UV and NV of twenty should all be considered the same value. That's why Perl doesn't provide an interface to provide that information in core (although it's trivial for an XS module to access that information).

* — It's called "IV", but Devel::Peek printed "UV" because it currently contains a UV.


In reply to Re: Is an SV and IV or a PV or an NV or a UV? How can I tell? by ikegami
in thread Is an SV and IV or a PV or an NV or a UV? How can I tell? by Anonymous Monk

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.