diff options
author | Yves Orton <demerphq@gmail.com> | 2022-10-28 23:28:06 +0200 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2022-11-02 08:51:17 +0100 |
commit | b6990aaa91d25c6b5dd6bbd1ec6479e4dbd6cd8c (patch) | |
tree | 9f959d6d7eae860b89a6f78740437dbea5defcb1 /op.c | |
parent | f8552c1a7e2b27e9c88f12e4569bbdf7218d0f27 (diff) | |
download | perl-b6990aaa91d25c6b5dd6bbd1ec6479e4dbd6cd8c.tar.gz |
re/fold_grind.pl - rework so we don't double compile patterns
We were calling utf8::upgrade() on qr// objects, which works, in
that it stringifies the pattern, and then upgrades the string, and
the string can be used to match against. But it double compiles the
pattern, which is a bit unnecessary. For example
$pat= qr/\x{DF}/;
utf8::upgrade($pat); # $pat is now a string!
"ss"=~/$pat/; # and now $pat gets compiled again
works, but it does twice the work needed.
This was found by making utf8::upgrade() ignore refs.
Diffstat (limited to 'op.c')
0 files changed, 0 insertions, 0 deletions