Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: athompso [...] athompso.net
Cc:
AdminCc:

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



Warnings on most data types when running inside a perl interpreter invoked with "-W": Argument "VSC" isn't numeric in addition (+) at /usr/share/perl5/Data/Dump.pm line 235. Replacing -W with use warnings all; and use strict; doesn't produce the same error, however. Not enough of a Perl programmer to understand why...
On Sun Mar 31 15:12:55 2013, athompso wrote: Show quoted text
> Warnings on most data types when running inside a perl interpreter > invoked with "-W":
The -W flag enables warnings everywhere and overrides any localized attempts to disable them. In this case, the line of code is elsif (do {no warnings 'numeric'; $$rval + 0 eq $$rval}) { which appears to be checking whether or not the data's string and numeric values are the same in order to decide whether or not to enclose the dumped value in quotes. The warning is expected for string data and thus disabled for the enclosing block, but -W makes perl ignore that and emit a warning anyway. In general, you should be adding "use warnings" to your code and *not* using the -w or -W flag on the command line.