Skip Menu |

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

Report information
The Basics
Id: 44621
Status: resolved
Priority: 0/
Queue: Data-Dump-Streamer

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

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



Subject: [PATCH] DumpLex tests
DumpLex is a little bit buggy. It does not print the lexical name for simple scalars. It spews warnings, same problem as in bug #28053. Fix with tests attached.
Subject: 0001-DumpLex-tests.patch
From f9cfca44401cf596516a68fbf255cc1445ea4390 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Lars=20D=C9=AA=E1=B4=87=E1=B4=84=E1=B4=8B=E1=B4=8F=E1=B4=A1?= <daxim@cpan.org> Date: Fri, 27 Mar 2009 11:43:43 +0100 Subject: [PATCH] DumpLex tests --- lib/Data/Dump/Streamer.pm | 4 ++-- t/dumplex.t | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 t/dumplex.t diff --git a/lib/Data/Dump/Streamer.pm b/lib/Data/Dump/Streamer.pm index d843fd6..6a1215b 100644 --- a/lib/Data/Dump/Streamer.pm +++ b/lib/Data/Dump/Streamer.pm @@ -1173,7 +1173,7 @@ sub DumpLex { return $obj; } else { $obj||=__PACKAGE__; - return $obj->Data(@_)->Names(@names)->Out(); + return $obj->Names(@names)->Data(@_)->Out(); } } @@ -3003,7 +3003,7 @@ sub Names { Carp::confess "Bad name '$_'" if $s && $s!~/^\*?\w+$/; $s - } @$v ]; + } grep {defined} @$v ]; return $self; } elsif (! defined wantarray ) { $self->{unames}=[]; diff --git a/t/dumplex.t b/t/dumplex.t new file mode 100644 index 0000000..6019e98 --- /dev/null +++ b/t/dumplex.t @@ -0,0 +1,20 @@ +use Test::More; +my $have_padwalker = eval q(use PadWalker '1'; 1;); +my $have_tnw = eval q(use Test::NoWarnings; 1;); +if ($have_padwalker) { + plan tests => 2; +} else { + plan skip_all => 'DumpLex requires PadWalker => 1.0'; +}; + +use Data::Dump::Streamer; + +my $foo = "bar"; +is DumpLex($foo)->Out, q($foo = 'bar';) . "\n", + 'lexical name instead of generic $VAR1'; + +SKIP: { + skip 'requires Test::NoWarnings', 1 unless $have_tnw; + diag q(provoke 'uninitialized' warning like bug 28053); + diag DumpLex([[q(), undef]]); +}; -- 1.6.1.3
From: norbi [...] nix.hu
I can also confirm that DumpLex() does not work. Can you please apply the patch that DAXIM provided?
From: norbi [...] nix.hu
On Thu Feb 11 09:07:44 2010, norbi@nix.hu wrote: Show quoted text
> I can also confirm that DumpLex() does not work. Can you please apply > the patch that DAXIM provided?
Please, please! :-) norbi
Hi, I noticed your ping from #perl on IRC. I'm headed off on vacation tomorrow morning. Ask mst or demerphq to apply the patch.
From: norbi [...] nix.hu
On Fri Sep 10 02:52:57 2010, JJORE wrote: Show quoted text
> Hi, I noticed your ping from #perl on IRC. I'm headed off on vacation > tomorrow morning. Ask mst or demerphq to apply the patch.
Eh, sorry, I missed this comment. I guess you're back from the vacation. :-) Could you please apply the patch?
Subject: Re: [rt.cpan.org #44621] [PATCH] DumpLex tests
Date: Mon, 17 Jan 2011 19:58:29 -0800
To: bug-Data-Dump-Streamer [...] rt.cpan.org
From: Joshua ben Jore <twists [...] gmail.com>
2011/1/13 Norbert Buchmüller via RT <bug-Data-Dump-Streamer@rt.cpan.org>: Show quoted text
>       Queue: Data-Dump-Streamer >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=44621 > > > On Fri Sep 10 02:52:57 2010, JJORE wrote:
>> Hi, I noticed your ping from #perl on IRC. I'm headed off on vacation >> tomorrow morning. Ask mst or demerphq to apply the patch.
> > Eh, sorry, I missed this comment. I guess you're back from the vacation. > :-) Could you please apply the patch?
Sorry for not seeing your memo. Absolutely. Tomorrow night after work.
This patch doesn't pass tests when I apply it. Working on it.
Resolved with 2.23