in reply to Re^2: Where to find info on low level perl internals names?
in thread Where to find info on low level perl internals names?

In both case, we have scalars of the same type (PVIO). But just like an IV can hold more than one kind of data, PVIO can contain one of two types of handles. I'll clarify that in my table.

By the way, you didn't show the difference, so here goes:

$ perl -MDevel::Peek -we'open FH,$^X; Dump *FH{IO}' SV = IV(0x7564a8) at 0x7564b0 REFCNT = 1 FLAGS = (TEMP,ROK) RV = 0x7693f0 SV = PVIO(0x76ccb8) at 0x7693f0 REFCNT = 2 FLAGS = (OBJECT) STASH = 0x768b68 "IO::File" IFP = 0x763b30 OFP = 0x0 DIRP = 0x0 LINES = 0 PAGE = 0 PAGE_LEN = 60 LINES_LEFT = 0 TOP_GV = 0x0 FMT_GV = 0x0 BOTTOM_GV = 0x0 TYPE = '<' FLAGS = 0x0 $ perl -MDevel::Peek -we'opendir DH,"."; Dump *DH{IO}' SV = IV(0x759d18) at 0x759d20 REFCNT = 1 FLAGS = (TEMP,ROK) RV = 0x76cc78 SV = PVIO(0x770528) at 0x76cc78 REFCNT = 2 FLAGS = (OBJECT) STASH = 0x76c3d8 "IO::File" IFP = 0x0 OFP = 0x0 DIRP = 0x7a7330 LINES = 0 PAGE = 0 PAGE_LEN = 60 LINES_LEFT = 0 TOP_GV = 0x0 FMT_GV = 0x0 BOTTOM_GV = 0x0 TYPE = '\0' FLAGS = 0x0

Replies are listed 'Best First'.
Re^4: Where to find info on low level perl internals names?
by Tux (Canon) on Oct 26, 2011 at 11:18 UTC

    You're example shows the difference. You can only get to that when *explicitly* looking at the IO glob part. I wanted to stress that when not doing so, you cannot see it. Together this is valuable information :)


    Enjoy, Have FUN! H.Merijn