Skip Menu |

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

Report information
The Basics
Id: 112708
Status: open
Priority: 0/
Queue: Data-Dumper-Concise

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

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



Subject: DWarn with empty @arglist profoundly confusing.

Was just fooling around and managed to accidentally stumble into this:

 perl -MDevel::Dwarn -e 'my (@items); Dwarn @items;'
Warning: something's wrong at <...>/Data/Dumper/Concise/Sugar.pm line 20.


( case furnished slightly to give a semi-real situation where you could encounter it )

 perl -MDevel::Dwarn -Mstrictures -d:Confess -e 'my (@items)=(1,2,3); Dwarn @items and shift @items for 0..3'

 

When `@items` becomes empty, `Dwarn` regresses to printing (abridged, with -d:Confess added):

Warning: something's wrong at <...>/Data/Dumper/Concise/Sugar.pm line 20.
    Data::Dumper::Concise::Sugar::DwarnL() called at <...>/Data/Dumper/Concise/Sugar.pm line 15
    Data::Dumper::Concise::Sugar::Dwarn() called at -e line 1

I would suggest the right thing to do here would be emit "()" in such a condition, but not entirely sure.

Subject: Re: [rt.cpan.org #112708] DWarn with empty @arglist profoundly confusing.
Date: Fri, 4 Mar 2016 11:31:00 -0800
To: bug-Data-Dumper-Concise [...] rt.cpan.org
From: fREW Schmidt <frioux [...] gmail.com>
I agree, an output of `()` seems best to me. On Fri, Mar 4, 2016 at 11:18 AM, Kent Fredric via RT < bug-Data-Dumper-Concise@rt.cpan.org> wrote: Show quoted text
> Fri Mar 04 14:18:39 2016: Request 112708 was acted upon. > Transaction: Ticket created by KENTNL > Queue: Data-Dumper-Concise > Subject: DWarn with empty @arglist profoundly confusing. > Broken in: 2.022 > Severity: (no value) > Owner: Nobody > Requestors: KENTNL@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=112708 > > > > Was just fooling around and managed to accidentally stumble into this: > > perl -MDevel::Dwarn -e 'my (@items); Dwarn @items;' > Warning: something's wrong at <...>/Data/Dumper/Concise/Sugar.pm line 20. > > > ( case furnished slightly to give a semi-real situation where you could > encounter it ) > > perl -MDevel::Dwarn -Mstrictures -d:Confess -e 'my (@items)=(1,2,3); Dwarn > @items and shift @items for 0..3' > > When `@items` becomes empty, `Dwarn` regresses to printing (abridged, with > -d:Confess added): > > Warning: something's wrong at <...>/Data/Dumper/Concise/Sugar.pm line 20. > Data::Dumper::Concise::Sugar::DwarnL() called at > <...>/Data/Dumper/Concise/Sugar.pm line 15 > Data::Dumper::Concise::Sugar::Dwarn() called at -e line 1 > > I would suggest the right thing to do here would be emit "()" in such a > condition, but not entirely sure. > >
-- fREW Schmidt http://blog.afoolishmanifesto.com