Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

has RV gone in 5.12?

by xiaoyafeng (Chaplain)
on Sep 04, 2011 at 12:23 UTC ( #924068=perlquestion: print w/replies, xml ) Need Help??
xiaoyafeng has asked for the wisdom of the Perl Monks concerning the following question:

I've got some research of perl API on perl 5.12, but find some difference between document and output:

# perldoc Devel::Peek A reference to an array This shows what a reference to an array looks like. use Devel::Peek; $a = [42]; Dump $a; The output: SV = RV(0xf041c) REFCNT = 1 FLAGS = (ROK) RV = 0xb2850 SV = PVAV(0xbd448) REFCNT = 1 FLAGS = () IV = 0 NV = 0 ARRAY = 0xb2048 ALLOC = 0xb2048 FILL = 0 MAX = 0 ARYLEN = 0x0 FLAGS = (REAL) Elt No. 0 0xb5658 SV = IV(0xbe860) REFCNT = 1 FLAGS = (IOK,pIOK) IV = 42 # output I run C:\>perl SV = IV(0x19dd38) at 0x19dd3c REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0x14a90c SV = PVAV(0x14c204) at 0x14a90c REFCNT = 1 FLAGS = () ARRAY = 0x1a208c FILL = 0 MAX = 0 ARYLEN = 0x0 FLAGS = (REAL) Elt No. 0 SV = IV(0x14a9a8) at 0x14a9ac REFCNT = 1 FLAGS = (IOK,pIOK) IV = 42

does it mean RV is replaced by IV from version 12 or something else I didn't notice? Please Enlighten me.

Thanks !

Below is perl info.

C:\>perl -V Set up gcc environment - 3.4.5 (mingw-vista special r3) Summary of my perl5 (revision 5 version 12 subversion 3) configuration +: Platform: osname=MSWin32, osvers=5.2, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=und +ef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='C:/Perl/site/bin/gcc.exe', ccflags ='-DNDEBUG -DWIN32 -D_CONSO +LE -DNO_ST RICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DP +ERL_IMPLIC IT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T -DPERL_MSVCRT_READFIX -DHASATT +RIBUTE -fn o-strict-aliasing -mms-bitfields', optimize='-O2', cppflags='-DWIN32' ccversion='', gccversion='3.4.5 (mingw-vista special r3)', gccosan +dvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64 +', lseeksi ze=8 alignbytes=8, prototype=define Linker and Libraries: ld='C:\Perl\site\bin\g++.exe', ldflags ='-L"C:\Perl\lib\CORE"' libpth=\lib libs=-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 +-lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion +-lodbc32 - lodbccp32 -lcomctl32 -lmsvcrt perllibs=-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvap +i32 -lshel l32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lvers +ion -lodbc 32 -lodbccp32 -lcomctl32 -lmsvcrt libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl512.lib gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-mdll -L"C:\Perl\lib\CORE"' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF USE_SITECUSTOMIZE Locally applied patches: ActivePerl Build 1204 [294330] c6fbf28 [perl #71806] perldb does not setup %dbline with the s +hebang opt ion -d 1fd8fa4 Add Wolfram Humann to AUTHORS f120055 make string-append on win32 100 times faster a2a8d15 Define _USE_32BIT_TIME_T for VC6 and VC7 007cfe1 Don't pretend to support really old VC++ compilers 6d8f7c9 Get rid of obsolete PerlCRT.dll support d956618 Make Term::ReadLine::findConsole fall back to STDIN if + /dev/tty can't be opened 321e50c Escape patch strings before embedding them in patchlev +el.h Built under MSWin32 Compiled at Feb 9 2011 14:38:22 @INC: C:/Perl/site/lib C:/Perl/lib .

I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

Replies are listed 'Best First'.
Re: has RV gone in 5.12?
by Anonymous Monk on Sep 04, 2011 at 12:58 UTC
Re: has RV gone in 5.12?
by ikegami (Pope) on Sep 04, 2011 at 20:56 UTC

    The types of SV in 5.10.0 (from sv.h):

    typedef enum { SVt_NULL, /* 0 */ SVt_BIND, /* 1 */ SVt_IV, /* 2 */ SVt_NV, /* 3 */ /* RV was here, before it was merged with IV. */ SVt_PV, /* 4 */ SVt_PVIV, /* 5 */ SVt_PVNV, /* 6 */ SVt_PVMG, /* 7 */ SVt_REGEXP, /* 8 */ /* PVBM was here, before BIND replaced it. */ SVt_PVGV, /* 9 */ SVt_PVLV, /* 10 */ SVt_PVAV, /* 11 */ SVt_PVHV, /* 12 */ SVt_PVCV, /* 13 */ SVt_PVFM, /* 14 */ SVt_PVIO, /* 15 */ SVt_LAST /* keep last in enum. used to size arrays */ } svtype;

    As you can see, SVt_RV was removed. It was identical to SVt_IV, and removing it allowed the addition of a new type.

    illguts doesn't reflect this change. Filed a bug report

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://924068]
Approved by Corion
Front-paged by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (1)
As of 2017-07-27 02:54 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (402 votes). Check out past polls.