Skip Menu |

This queue is for tickets about the Data-Dx CPAN distribution.

Report information
The Basics
Id: 122375
Status: resolved
Priority: 0/
Queue: Data-Dx

People
Owner: DCONWAY [...] cpan.org
Requestors: MANWAR [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.000004
Fixed in: (no value)



Subject: typo in SYNOPSIS
Hi Damian, First, thanks for such a lovely module. I am a big fan of yours since I read your book "Perl Best Practices". While reading the pod for Data::Dx, I came across minor typo as below: #line 20 demo.pl @bar = ["b", "a", "r"] Shouldn't it be like below instead? #line 20 demo.pl @bar = ("b", "a", "r") What a shame I can't install it on my ubuntu 16.04 box running perl v5.18.2. It would be great if code was available on GitHub, then user, like me, can send you PR easily. Best Regards, Mohammad S Anwar
Subject: Re: [rt.cpan.org #122375] typo in SYNOPSIS
Date: Thu, 6 Jul 2017 20:43:05 +1000
To: bug-Data-Dx [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Hi Mohammad, Thanks for taking the time to send this feedback. Show quoted text
> @bar = ["b", "a", "r"] > > Shouldn't it be like below instead? > > @bar = ("b", "a", "r")
Possibly. But the actual data structure that's reported is controlled by Data::Dump, and that module produces the former, not the latter. The thing to remember is that what is being reported isn't supposed to be correct executable Perl. Nor is it designed to be a serialization tool. It's simply supposed to be a clear indication of the name and structure of the data. And I would argue that ["b", "a", "r"] more accurately reflexts the fact that @bar is an array (rather than just a list). Though, I concede, by that argument, it might be even more accurate if it were reported as: @bar = @{[ "b", "a", "r" ]} Of course, that's getting needlessly line-noisy. Hmmmm. I'll continue to ponder this issue you've raised, though I don't promise to change anything. ;-) Show quoted text
> What a shame I can't install it on my ubuntu 16.04 box running perl
v5.18.2. Why not? It runs fine under v5.18.4 on my Macbook Pro. Is there some particular reason you can't install it under Linux? Show quoted text
> It would be great if code was available on GitHub, > then user, like me, can send you PR easily.
I deeply appreciate the sentiment, but I don't actually use GitHub (except as a publication medium for my .vimrc). You are always welcome to send me a diff or patch against the current CPAN distro, of course. :-) All the best, Damian