data-dump
data-dump copied to clipboard
pp($value) modify original value in parameter on perl 5.28.1
I have following "test-script.pl":
use Data::Dump "pp";
use JSON "to_json";
my $a = ["12"];
print "ORIG 1: ", to_json($a), "\n";
print "PP: ", pp($a), "\n";
print "ORIG 2: ", to_json($a), "\n";`
When I run it on perl 5.28.1, the original value in parameter is changed:
bash$ /opt/perl-5.28.1/bin/perl test-script.pl
ORIG 1: ["12"]
PP: [12]
ORIG 2: [12]
When I try same code in perl 5.26.3, the original value is not modified:
bash$ /opt/perl-5.26.3/bin/perl test-script.pl
ORIG 1: ["12"]
PP: [12]
ORIG 2: ["12"]
This may be the result of https://rt.cpan.org/Ticket/Display.html?id=129922