From: Steve Hancock Date: Sat, 25 Mar 2023 01:40:04 +0000 (-0700) Subject: update for issue c206 X-Git-Tag: 20230309.02~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8e7ede5a1625c41d20793ed8ac1477e814255891;p=perltidy.git update for issue c206 --- 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;