This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Filter::Simple: eliminate /\C/
authorDavid Mitchell <davem@iabyn.com>
Fri, 4 Jul 2014 11:22:23 +0000 (12:22 +0100)
committerDavid Mitchell <davem@iabyn.com>
Fri, 4 Jul 2014 11:22:23 +0000 (12:22 +0100)
commit2cc5c789bc534d97c91560f0dfc3d9cba5874437
tree30508b62a6786ccca2d6bbd2cf816f0d859e8299
parentaddc238729712719a1b043848bfc201457ad38e7
Filter::Simple: eliminate /\C/

Since that construct is now deprecated, don't use it. It turns out that
it's usage was almost certainly wrong anyway, and a simple /./s is better.

It was temporarily converting literals within the src text to "$;NNNN$;"
where the Ns are 4 octets that encode the index of the literal.  It was
then using /(\C{4})/ to later extract those octets. But since the octets
were originally inserted as chars anyway, they should be extracted as
chars too.

I suspect the original code could have failed on utf8 source once the
number of literals exceeded 0x80.
dist/Filter-Simple/lib/Filter/Simple.pm