summaryrefslogtreecommitdiff
path: root/t/re
diff options
context:
space:
mode:
authorLoren Merritt <pengvado@videolan.org>2022-07-14 00:09:06 +0000
committerℕicolas ℝ <nicolas@atoomic.org>2022-07-20 15:03:07 -0600
commitbe76ad45a5a937ec83906e666e2318c0351115b4 (patch)
tree8bc97d8c1b33b15fe81ea192c063f270853b3918 /t/re
parent7d47ba27dfa1ef9db23c4e6f934b0698d7fd539f (diff)
downloadperl-be76ad45a5a937ec83906e666e2318c0351115b4.tar.gz
pp_subst: optimize by not calling utf8_length
Length just isn't needed, and often took more cpu-time than the actual regex.
Diffstat (limited to 't/re')
-rw-r--r--t/re/pat_rt_report.t3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/re/pat_rt_report.t b/t/re/pat_rt_report.t
index ced4fe670b..895da8ea81 100644
--- a/t/re/pat_rt_report.t
+++ b/t/re/pat_rt_report.t
@@ -1076,10 +1076,11 @@ SKIP: {
unless $Config{extensions} =~ / Encode /;
# Test case cut down by jhi
- fresh_perl_like(<<'EOP', qr!Malformed UTF-8 character \(unexpected end of string\) in substitution \(s///\) at!, {}, 'Segfault using HTML::Entities');
+ fresh_perl_like(<<'EOP', qr!Malformed UTF-8 character \(unexpected end of string\)!, {}, 'Segfault using HTML::Entities');
use Encode;
my $t = ord('A') == 193 ? "\xEA" : "\xE9";
Encode::_utf8_on($t);
+substr($t,0);
$t =~ s/([^a])//ge;
EOP
}