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.