Your use of "is" is incorrect when talking about scalar types. An IV is not necessarily an integer.

$ perl -MB -E'$_=123; $_=undef; say B::class B::svref_2object \$_' IV

SV is the base "class" for all Perl variables (not just scalars), but yeah, the "S" stands for "scalar".

Here goes:

B class nameActual SV typeDescriptionExample
SPECIALNULLCan hold undefperl -MB -E'say B::class B::svref_2object \undef'
PVPVCan hold undef, a string of 8 bit chars or a string of 32/64 bit charsperl -MB -E'say B::class B::svref_2object \"a"'
IVIVCan hold undef, a reference, a signed int or an unsigned integerperl -MB -E'say B::class B::svref_2object \123'
NVNVCan hold undef or a floating point numberperl -MB -E'say B::class B::svref_2object \1.3'
PVIVPVIVCan hold undef, a reference, a signed int, an unsigned integer, a string of 8 bit chars and/or a string of 32/64 bit charsperl -MB -E'$_=123; "".$_; say B::class B::svref_2object \$_'
PVNVPVNVCan hold undef, a reference, a signed int, an unsigned integer, a floating point number, a string of 8 bit chars and/or a string of 32/64 bit charsperl -MB -E'$_=1.3; "".$_; say B::class B::svref_2object \$_'
PVMGPVMGA PVNV that supports magicperl -MB -E'say B::class B::svref_2object \$|'
PVLVPVLVA PVMG with extra fields, used for lvaluesperl -MB -E'say B::class B::svref_2object \substr("",0)'
GVPVGVA globperl -MB -E'say B::class B::svref_2object \*FOO'
AVPVAVAn arrayperl -MB -E'say B::class B::svref_2object []'
HVPVHVA hashperl -MB -E'say B::class B::svref_2object {}'
CVPVCVA subperl -MB -E'say B::class B::svref_2object sub{}'
FMPVFMA format
use B; use feature qw( say ); format X = Foo . say B::class B::svref_2object *X{FORMAT};
IOPVIOCan hold a file handle or a directory handleperl -MB -E'say B::class B::svref_2object *STDOUT{IO}'
REGEXPREGEXPA regexp objectperl -MB -E'say B::class B::svref_2object qr//'

The "P" in "PV" is for "pointer".

Where "and/or" is used, all combinations are possible, with the following exceptions:

While it is technically possible for some scalars to contain both a reference and something else, Perl doesn't create these, and I don't know how safe it is.


In reply to Re: Where to find info on low level perl internals names? by ikegami
in thread Where to find info on low level perl internals names? 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.