Skip Menu |

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

Report information
The Basics
Id: 129922
Status: open
Priority: 0/
Queue: Data-Dump

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

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



Subject: dump() turns normal variable into dualvar
$ perl -MScalar::Util=isdual -MData::Dump=dump -E '$a = "xxx"; warn isdual($a); dump $a; warn isdual($a)' Warning: something's wrong at -e line 1. "xxx" 1 at -e line 1. ------------------ Expected: Warning: something's wrong at -e line 1. "xxx" Warning: something's wrong at -e line 1.
On 2019-06-27 05:32:03, OLEG wrote: Show quoted text
> $ perl -MScalar::Util=isdual -MData::Dump=dump -E '$a = "xxx"; warn > isdual($a); dump $a; warn isdual($a)' > Warning: something's wrong at -e line 1. > "xxx" > 1 at -e line 1. > > ------------------ > > Expected: > Warning: something's wrong at -e line 1. > "xxx" > Warning: something's wrong at -e line 1.
Possibly caused by using "+0" on the argument here: https://metacpan.org/source/GAAS/Data-Dump-1.23/lib/Data/Dump.pm#L232 I wonder if the check could be replaced using Scalar::Util::looks_like_number() (if it's available) --- in most (all?) cases it should return the same as the current check and we could also get rid of the "no warnings" block.
On 2019-09-06 10:38:24, SREZIC wrote: Show quoted text
> On 2019-06-27 05:32:03, OLEG wrote:
> > $ perl -MScalar::Util=isdual -MData::Dump=dump -E '$a = "xxx"; warn > > isdual($a); dump $a; warn isdual($a)' > > Warning: something's wrong at -e line 1. > > "xxx" > > 1 at -e line 1. > > > > ------------------ > > > > Expected: > > Warning: something's wrong at -e line 1. > > "xxx" > > Warning: something's wrong at -e line 1.
> > Possibly caused by using "+0" on the argument here: > https://metacpan.org/source/GAAS/Data-Dump-1.23/lib/Data/Dump.pm#L232 > > I wonder if the check could be replaced using > Scalar::Util::looks_like_number() (if it's available) --- in most > (all?) cases it should return the same as the current check and we > could also get rid of the "no warnings" block.
Ah, this was already proposed in: https://rt.cpan.org/Ticket/Display.html?id=86592