Open zmughal opened 2 years ago
Module: Data::Dumper
Description
Currently the
Useqq
flag /qquote
function ofData::Dumper
only uses\x
-style hex escapes on non-ASCII codepoints and octal for others. Of note, this means that control characters (/[\x00-\x1F]/
) are represented in octal.It might be useful to have a flag to prefer hex escapes over octal escapes for these non-printables.
Steps to Reproduce
$ print Data::Dumper->new(["\x1f\x{FFF}"])->Useqq(1)->Terse(1)->Dump "\37\x{fff}"
Am I correct in thinking that what you really intended to say here at the command-prompt was this?
$ perl -MData::Dumper -e 'print Data::Dumper->new(["\x1f\x{FFF}"])->Useqq(1)->Terse(1)->Dump'
"\37\x{fff}"
Am I correct in thinking that what you really intended to say here at the command-prompt was this?
I should have clarified that I was copying from a REPL prompt, but yes, that's how it would run from the shell.
Module: Data::Dumper
Description
Currently the
Useqq
flag /qquote
function ofData::Dumper
only uses\x
-style hex escapes on non-ASCII codepoints and octal for others. Of note, this means that control characters (/[\x00-\x1F]/
) are represented in octal.It might be useful to have a flag to prefer hex escapes over octal escapes for these non-printables.
Steps to Reproduce
Expected behavior