-
Notifications
You must be signed in to change notification settings - Fork 555
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
Data::Dumper Feature Request: Tighter packing options #15071
Comments
From @kentfredricData::Dumper has long annoyed me with even its terse forms being excessively terse, and terse+1 being longer than is useful. Take for instance, the output dumped from this structure: [ Data::Dumper gives you 2 choices, Indent=1 gives you 37 lines, Indent=0 gives you one line. Neither are very good for readability. It could be possibly improved with an option to pack it instead like this: [ Which is how Data::Dump formats it. It seems to have a threshold where it trips each structure at: For instance, these 2 structures give 2 slightly different results: { The first becomes: { The Second becomes: { alpha => [2, 3, 1, 4, 5, 9, 1], beta => [1, 3, 2, 4, 5, 9, 1] } And that's a behaviour I think is worth emulating. However, Both Data::Dump and Data::Dumper break down and produce large screens of data with large arrays, and I think we can do better. [ sort { rand() <=> rand() } 1 .. 40 ], This could possibly be represented in terms of [ Similar opportunities exist for hash structures: With few enough items: { a => 1, b => 1, c => 1, d => 1, e => 1, f => 1, g => 1, h => 1 } With lots of items: { It may be better to have 2 control options to seperate condensing Though of my last three requests, this is the one I imagine Flags: Site configuration information for perl 5.22.0: Configured by kent at Fri Jun 19 08:03:55 NZST 2015. Summary of my perl5 (revision 5 version 22 subversion 0) configuration: @INC for perl 5.22.0: Environment for perl 5.22.0: |
From @jkeenanOn Sat, 05 Dec 2015 02:33:42 GMT, kentfredric wrote:
This ticket has received no comments or replies since it was first posted in December 2015. Lack of comment on a new feature request usually means that people have (silently) made the judgment: "The benefit of this feature does not outweigh the cost of creating and maintaining it." I suspect that's the case here. Data::Dumper poses maintenance problems because it has both "pure perl" and XS versions. New features would have to be implemented both ways. The people who can grok the XS code only have the time to keep up with critical bugs. I doubt they have time to implement additional features -- and then maintain them. In this situation you're more likely to get the new functionality if you do it first as a new CPAN distribution. If that CPAN distribution is well received, then perhaps it could be brought into core in future years. For that reason I recommend that we close this ticket. Thank you very much. -- |
The RT System itself - Status changed from 'new' to 'open' |
From @kentfredricOn 3 September 2017 at 12:16, James E Keenan via RT
The given behaviour I describe already exists in a competing CPAN -- KENTNL - https://metacpan.org/author/KENTNL |
From @iabynOn Sat, Sep 02, 2017 at 05:16:00PM -0700, James E Keenan via RT wrote:
Or equally likely: the ticket got forgotten; or someone thinks the idea is Etc. I think wishlist tickets should be kept open unless we have explicitly -- |
From @demerphqThis feature request is relatively easy to implement as a regex post At work in fact we already have done something very similar. I will Yves On 4 Sep 2017 11:32, "Dave Mitchell" <davem@iabyn.com> wrote:
|
@demerphq, did that code ever get released? If not, I think this ticket is closable.
|
I lost track. I can get it released I think.
Yves
…On Mon, 5 Jul 2021, 16:20 James E Keenan, ***@***.***> wrote:
From @demerphq <https://github.com/demerphq>
This feature request is relatively easy to implement as a regex post
processor. Dumper output is sufficiently well defined and stable that this
does not constitute parsing perl with regexes.
At work in fact we already have done something very similar. I will
investigate releasing said code in about a week.
Yves
@demerphq <https://github.com/demerphq>, did that code ever get released?
If not, I think this ticket is closable.
On 4 Sep 2017 11:32, "Dave Mitchell" <davem@iabyn.com> wrote:
On Sat, Sep 02, 2017 at 05:16:00PM -0700, James E Keenan via RT wrote:
This ticket has received no comments or replies since it was first
posted in December 2015. Lack of comment on a new feature request
usually means that people have (silently) made the judgment: "The
benefit of this feature does not outweigh the cost of creating and
maintaining it."
Or equally likely: the ticket got forgotten; or someone thinks the idea is
good but hasn't had time to do it yet; or people think the idea is good
but its not their area of expertise.
Etc.
I think wishlist tickets should be kept open unless we have explicitly
rejected a suggestion.
No matter how many dust sheets you use, you will get paint on the carpet.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#15071 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAZ5RYXNBRF5BDKGIJHYXLTWG5RRANCNFSM4722MWYA>
.
|
Migrated from rt.perl.org#126814 (status was 'open')
Searchable as RT126814$
The text was updated successfully, but these errors were encountered: