From 7bf15fe2240f4090d85a676abda2b04456b58caa Mon Sep 17 00:00:00 2001 From: James E Keenan Date: Sat, 13 Oct 2018 21:13:14 -0400 Subject: [PATCH] Update example of Dump on hashref. For: RT # 133499 Per Tony Cook, the behavior changed in e1a7ec8d453649a65aea34af90c3042a5137191e (March 2013). --- ext/Devel-Peek/Peek.pm | 43 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/ext/Devel-Peek/Peek.pm b/ext/Devel-Peek/Peek.pm index 3d790e763ad2..bd56b86a60c9 100644 --- a/ext/Devel-Peek/Peek.pm +++ b/ext/Devel-Peek/Peek.pm @@ -3,7 +3,7 @@ package Devel::Peek; -$VERSION = '1.27'; +$VERSION = '1.28'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -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>. + 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