Skip to content

Commit

Permalink
Update example of Dump on hashref.
Browse files Browse the repository at this point in the history
For: RT # 133499

Per Tony Cook, the behavior changed in
e1a7ec8 (March 2013).
  • Loading branch information
jkeenan committed Oct 14, 2018
1 parent 8fc0553 commit 7bf15fe
Showing 1 changed file with 20 additions and 23 deletions.
43 changes: 20 additions & 23 deletions ext/Devel-Peek/Peek.pm
Expand Up @@ -3,7 +3,7 @@

package Devel::Peek;

$VERSION = '1.27';
$VERSION = '1.28';
$XS_VERSION = $VERSION;
$VERSION = eval $VERSION;

Expand Down Expand Up @@ -411,28 +411,25 @@ The following shows the raw form of a reference to a hash.
The output:
SV = IV(0x8177858) at 0x816a618
REFCNT = 1
FLAGS = (ROK)
RV = 0x814fc10
SV = PVHV(0x8167768) at 0x814fc10
REFCNT = 1
FLAGS = (SHAREKEYS)
ARRAY = 0x816c5b8 (0:7, 1:1)
hash quality = 100.0%
KEYS = 1
FILL = 1
MAX = 7
RITER = -1
EITER = 0x0
Elt "hello" HASH = 0xc8fd181b
SV = IV(0x816c030) at 0x814fcf4
REFCNT = 1
FLAGS = (IOK,pIOK)
IV = 42
This shows C<$a> is a reference pointing to an SV. That SV is a PVHV, a
hash. Fields RITER and EITER are used by C<L<perlfunc/each>>.
SV = IV(0x55cb50b50fb0) at 0x55cb50b50fc0
REFCNT = 1
FLAGS = (ROK)
RV = 0x55cb50b2b758
SV = PVHV(0x55cb50b319c0) at 0x55cb50b2b758
REFCNT = 1
FLAGS = (SHAREKEYS)
ARRAY = 0x55cb50b941a0 (0:7, 1:1)
hash quality = 100.0%
KEYS = 1
FILL = 1
MAX = 7
Elt "hello" HASH = 0x3128ece4
SV = IV(0x55cb50b464f8) at 0x55cb50b46508
REFCNT = 1
FLAGS = (IOK,pIOK)
IV = 42
This shows C<$a> is a reference pointing to an SV. That SV is a PVHV, a hash.
The "quality" of a hash is defined as the total number of comparisons needed
to access every element once, relative to the expected number needed for a
Expand Down

0 comments on commit 7bf15fe

Please sign in to comment.