This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #58608] Fix DD’s dumping of qr|\/|
authorFather Chrysostomos <sprout@cpan.org>
Sat, 4 Feb 2012 07:09:21 +0000 (23:09 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 4 Feb 2012 07:11:09 +0000 (23:11 -0800)
commitde5ef703c7d8db6517e7d56d9c018d3ad03f210e
tree18b2b7dd939b001704ed7e45766f6af568fd5e93
parent2349afb83e6e66ff2f686fcb3e0ec67a51684811
[perl #58608] Fix DD’s dumping of qr|\/|

By trying to escape / as \/, DD was turning \/ into \\/, producing
invalid qr//’s like qr/ \\/ /.  You can’t (and don’t need to) escape a
/ preceded by a backslash.  But you have to make sure \\/ gets escaped
properly as \\\/.  Counting forward from the beginning of the string
and ignoring escaped characters is the proper way to do it.
dist/Data-Dumper/Dumper.pm
dist/Data-Dumper/Dumper.xs
dist/Data-Dumper/t/qr.t