-
Notifications
You must be signed in to change notification settings - Fork 584
Devel::Peek: misleading documentation for Dump($hashref) #16683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
From @jkeenanWhile looking at The relevant documentation is attached as ##### ... which are explained as: "Fields RITER and EITER are used Next, I ran the attached program, 'peek-hashref.pl' (again, Has the behavior of Devel::Peek changed since the Thank you very much. |
From @jkeenan=head2 A reference to a hash The following shows the raw form of a reference to a hash. use Devel::Peek; The output: SV = IV(0x8177858) at 0x816a618 This shows C<$a> is a reference pointing to an SV. That SV is a PVHV, a |
From @jkeenan |
From @jkeenanSV = IV(0x55cb50b50fb0) at 0x55cb50b50fc0 |
From @jkeenanSummary of my perl5 (revision 5 version 29 subversion 3) configuration: Characteristics of this binary (from libperl): |
From @tonycozOn Tue, 04 Sep 2018 07:44:00 -0700, jkeenan@pobox.com wrote:
No, the behaviour changed in e1a7ec8. Note that you can get RITER/EITER if the HV is iterated over: $ ./perl -Ilib -MDevel::Peek -le '$a = { hello => 42 }; keys(%$a); Dump($a)' So perhaps the example could be updated. Tony |
The RT System itself - Status changed from 'new' to 'open' |
From @jkeenanOn Thu, 06 Sep 2018 00:55:38 GMT, tonyc wrote:
Tony, thanks for that explanation. The updating could proceed in (at least) two directions: 1. We could retain the code being dumped and omit (i) omit the RITER and EITER lines from the output; and (ii) the sentence, "Fields RITER and EITER are used by perlfunc/each." 2. We could do (1) and then additionally document your example with 'keys'. However, in that case we would not only have to explain the RITER and EITER lines; we would have to explain some additional lines as well. This is what I get: ##### The FLAGS line now has: ##### ... instead of just (SHAREKEYS). This line is not previously documented: ##### This line is also not previously documented: ##### Given that the behavior changed back in 2013, the documentation has been misleading for several years. Hence, any change we make should be backportable to 5.26-maint and 5.28-maint. Approach (1) above is easy; I could do it today. But I don't know enough about hash structures to do approach (2). How shall we proceed? Thank you very much. -- |
From @tonycozOn Fri, 07 Sep 2018 07:24:27 -0700, jkeenan wrote:
The output of Devel::Peek's Dump() is very much an internals thing, I don't think it's a big deal that it doesn't exactly match. If it bothers you that we don't get quite the same output, please update the documentation to match. Tony |
From @jkeenanOn Fri, 07 Sep 2018 14:24:27 GMT, jkeenan wrote:
I decided to go with the simpler option: #1. Pushed to blead in commit 7bf15fe.
Thank you very much. -- |
@jkeenan - Status changed from 'open' to 'pending release' |
From @demerphqOn Fri, 7 Sep 2018, 16:24 James E Keenan via RT, <perlbug-followup@perl.org>
Nicholas used the OOK flag to signal that the HVAUX structure is included
These are flags in the HVAUX structure.
This is a mask used during iteration over the keys which makes it a bit
Up to you. These are optional fields and flags that only exist if the has Yves
|
From @jkeenanOn Mon, 15 Oct 2018 16:35:50 GMT, demerphq wrote:
Yves, Since I didn't hear anything for several weeks, I pushed a patch to blead yesterday. If you would like to make revisions along the lines of your comments above, could you propose a patch to blead? Thank you very much. -- |
From @khwilliamsonThank you for filing this report. You have helped make Perl better. With the release today of Perl 5.30.0, this and 160 other issues have been Perl 5.30.0 may be downloaded via: If you find that the problem persists, feel free to reopen this ticket. |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#133499 (status was 'resolved')
Searchable as RT133499$
The text was updated successfully, but these errors were encountered: