Skip to content

Data::Dump::dump silently changes string to integer #16

Description

@godsarmy

Hi

I am using Data::Dump v1.23 and found issue that Data::Dump::dump sliently changes string to integer to cause YAML dump print incorrect result.

Here are the example code

use YAML::XS;
use Data::Dump;

my $data = { id => [ '0123', '0234']};

print "before dump\n";
print YAML::XS::Dump($data);

Data::Dump::dump($data);

print "after dump\n";
print YAML::XS::Dump($data);

And if i launch the script, you can find the second YAML::XS::Dump print element in $data as integer.

$ perl testy.pl
before dump

---
id:
- '0123'
- '0234'
{ id => ["0123", "0234"] }
after dump

---
id:
- 0123
- 0234

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions