Skip Menu |

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

Report information
The Basics
Id: 71245
Status: open
Priority: 0/
Queue: Data-Show

People
Owner: Nobody in particular
Requestors: CARNIL [...] cpan.org
Cc:
AdminCc:

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



Subject: Does not report right arguments in divider line if used multiple times
Date: Mon, 26 Sep 2011 18:13:26 +0200
To: bug-Data-Show [...] rt.cpan.org
From: Salvatore Bonaccorso <carnil [...] cpan.org>
Hi Damian! Data::Show does not seem to report the right arguments in the divider line if show is used multiple times. The attached datashow.pl for example has a %hash, @keys and another @array, but show'ing the three, always: ======( @array )=======================[ 'datashow.pl', line 8 ]====== ("c", "d", "a", "b") ======( @array )======================[ 'datashow.pl', line 11 ]====== ("c", "a") ======( @array )======================[ 'datashow.pl', line 14 ]====== ("foo", "bar") So three times it shows "@array", even if the content of the dump then is correct. Data::Dump is at 1.19. Perl is 5.12.4. Regards, Salvatore

Message body is not shown because sender requested not to inline it.

Download signature.asc
application/pgp-signature 836b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #71245] AutoReply: Does not report right arguments in divider line if used multiple times
Date: Mon, 26 Sep 2011 19:01:00 +0200
To: Bugs in Data-Show via RT <bug-Data-Show [...] rt.cpan.org>
From: Salvatore Bonaccorso <carnil [...] cpan.org>
Hi Damian Okay, if I use show with the arguments, without parenthesis, then it does it right! ======( %hash )========================[ 'datashow.pl', line 9 ]====== { a => "b", c => "d" } ======( @keys )=======================[ 'datashow.pl', line 12 ]====== ["c", "a"] ======( @array )======================[ 'datashow.pl', line 15 ]====== ["foo", "bar"] so I have not used it correcty! Thinking about now it makes more sense however. Could that e.g. maybe be mentioned in the limitations of the module? Regards Salvatore
Download signature.asc
application/pgp-signature 836b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #71245] Does not report right arguments in divider line if used multiple times
Date: Fri, 30 Sep 2011 09:39:33 +1000
To: bug-Data-Show [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Hi Salvatore Show quoted text
> Data::Show does not seem to report the right arguments in the divider > line if show is used multiple times.
The script you sent works correctly (i.e. prints all three variable names) under Data::Show 0.001_004 on my MacBook Pro.Is it possible you're using an older version of Data::Show? Damian
Subject: Re: [rt.cpan.org #71245] Does not report right arguments in divider line if used multiple times
Date: Fri, 30 Sep 2011 07:57:37 +0200
To: "damian [...] conway.org via RT" <bug-Data-Show [...] rt.cpan.org>
From: Salvatore Bonaccorso <carnil [...] cpan.org>
Hi Damian Thanks for your reply On Thu, Sep 29, 2011 at 07:40:23PM -0400, damian@conway.org via RT wrote: Show quoted text
> > Data::Show does not seem to report the right arguments in the divider > > line if show is used multiple times.
> > The script you sent works correctly (i.e. prints all three variable names) > under Data::Show 0.001_004 on my MacBook Pro.Is it possible you're > using an older version of Data::Show?
Yes it was the latest shown release on cpan, 0.001002. If I use 0.001_004 it works for me too that it shows the correct variable names correctly. However the datastructure printed is still not the expected if using show( ) instead of show, like: ======( %hash )=======================[ 'datashow.pl', line 13 ]====== ("c", "d", "a", "b") ======( @keys )=======================[ 'datashow.pl', line 16 ]====== ("c", "a") ======( @array )======================[ 'datashow.pl', line 19 ]====== ("foo", "bar") The synopsis of the module shows the intended use is without () brackets, so I was wrong in the use in this part. Do you get the same above? Regards, Salvatore
Download signature.asc
application/pgp-signature 836b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #71245] Does not report right arguments in divider line if used multiple times
Date: Fri, 30 Sep 2011 16:06:44 +1000
To: bug-Data-Show [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Hi Salvatore, Thanks for clarifying the nature of the problem. And, yes, it is one of expectation. If you write: show %hash; then Data::Show treats it as an actual hash and prints it. But if you write: show( %hash ); then Data::Show treats it as: show (%hash) That is, it treats it as: the list whose contents is (the flattened elements of) %hash. It's debatable whether that's actually a bug (as hashes are always flattened within lists), but it's certainly at least a problem in the documentation. I will consider whether to fix the code or the docs for the next release. Thanks so much for pointing this issue out. Damian
Subject: Re: [rt.cpan.org #71245] Does not report right arguments in divider line if used multiple times
Date: Tue, 4 Oct 2011 15:43:59 +0200
To: "damian [...] conway.org via RT" <bug-Data-Show [...] rt.cpan.org>
From: Salvatore Bonaccorso <carnil [...] cpan.org>
Hi Damian Sorry for the delayed reply. On Fri, Sep 30, 2011 at 02:07:35AM -0400, damian@conway.org via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=71245 > > It's debatable whether that's actually a bug (as hashes are always > flattened within lists), but > it's certainly at least a problem in the documentation. I will > consider whether to fix the code > or the docs for the next release. > > Thanks so much for pointing this issue out.
Welcome! I think it would be an improvement at least documenting this in the manpage to be clear. For me it was confusing at the first glance reading the SYNOPSIS using it without parentesis, but show() in the INTERFACE section. Thanks for the module! Regards Salvatore
Download signature.asc
application/pgp-signature 836b

Message body not shown because it is not plain text.