From 8e7ede5a1625c41d20793ed8ac1477e814255891 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Fri, 24 Mar 2023 18:40:04 -0700 Subject: [PATCH] update for issue c206 --- lib/Perl/Tidy/Formatter.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 2da5ab98..06dc0e00 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -18312,10 +18312,11 @@ EOM # The most extreme cases in my collection are: # camel1.t - needs 2.7 compares per line (12 without optimization) # ternary.t - needs 2.8 compares per line (12 without optimization) - # So a value of MAX_COMPARE_RATIO = 3 looks like an upper bound as + # c206 - needs 3.3 compares per line, found with random testing + # So a value of MAX_COMPARE_RATIO = 4 looks like an upper bound as # long as optimization is used. A value of 20 should allow all code to # pass even if optimization is turned off for testing. - use constant MAX_COMPARE_RATIO => DEVEL_MODE ? 3 : 20; + use constant MAX_COMPARE_RATIO => DEVEL_MODE ? 4 : 20; my $num_pairs = $nend - $nbeg + 1; my $max_compares = MAX_COMPARE_RATIO * $num_pairs; -- 2.39.5