Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 31162
Status: rejected
Priority: 0/
Queue: Data-Dumper

Owner: smueller [...]
Requestors: RENEEB [...]

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

Subject: Strange behaviour with Useqq for \0
Download (untitled) / with headers
text/plain 527b
#!/usr/bin/perl use Data::Dumper; my %hash = ( string => "1\r5\09h\n", test => "1\r4\0t\n" ); my $h = { server => "2\03\04" }; $Data::Dumper::Useqq = 1; print Dumper \%hash,$h; And the output is: $VAR1 = { "test" => "1\r4\0t\n", "string" => "1\r5\0009h\n" }; $VAR2 = { "server" => "2\3\4" }; If \0 appears in a value of a hash just before a character everything is fine. If it is before a digit, three 0's are displayed. If \0 is in the value of a hashref, the 0 is erased...
Download (untitled) / with headers
text/plain 419b
Perl parses \000 (note the 3 digits) escapes in a complicated way. \09 seems to be parsed as \0 followed by a 9, because 9 isn't a valid octal digit. \03\04, on the other hand, is treated as \003\004. While it's true that Data::Dumper is surprising you by not always preserving the exact expression of the original literal, the examples you give do parse to the same string -- no information is lost, only formatting.
Marking as "not a bug" as per Greg Lindahl's explanation. Best regards, Steffen

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to