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

Report information
The Basics
Id:
129466
Status:
rejected
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
PERLANCAR [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: \034 (default value for $; for record separator) is not printed, unless Useqq=1
$ perl -MData::Dumper -E'for ("a\034b", ["a\034b"], {"a\034b"=>"c\034d"}) { say Dumper $_ }' $VAR1 = 'ab'; $VAR1 = [ 'ab' ]; $VAR1 = { 'ab' => 'cd' }; But: $ perl -MData::Dumper -E'$Data::Dumper::Useqq=1; for ("a\034b", ["a\034b"], {"a\034b"=>"c\034d"}) { say Dumper $_ }' $VAR1 = "a\34b"; $VAR1 = [ "a\34b" ]; $VAR1 = { "a\34b" => "c\34d" }; Compare with: $ perl -MData::Dump -E'for ("a\034b", ["a\034b"], {"a\034b"=>"c\034d"}) { dd $_ }' "a\34b" ["a\34b"] { "a\34b" => "c\34d" }
On Mon May 06 02:43:26 2019, PERLANCAR wrote:
Show quoted text
> $ perl -MData::Dumper -E'for ("a\034b", ["a\034b"], > {"a\034b"=>"c\034d"}) { say Dumper $_ }' > $VAR1 = 'ab'; > > $VAR1 = [ > 'ab' > ]; > > $VAR1 = { > 'ab' => 'cd' > }; > > But: > > $ perl -MData::Dumper -E'$Data::Dumper::Useqq=1; for ("a\034b", > ["a\034b"], {"a\034b"=>"c\034d"}) { say Dumper $_ }' > $VAR1 = "a\34b"; > > $VAR1 = [ > "a\34b" > ]; > > $VAR1 = { > "a\34b" => "c\34d" > }; > > Compare with: > > $ perl -MData::Dump -E'for ("a\034b", ["a\034b"], > {"a\034b"=>"c\034d"}) { dd $_ }' > "a\34b" > ["a\34b"] > { "a\34b" => "c\34d" }
The value is included in the output, it's just not a visible character. Outputting the character directly without any escaping is the appropriate thing to do when using single quotes.
I stand corrected on the "not printed" statement.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.