From 8b0042a40f5107c16943cffaea60c9d37f0d08a9 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Tue, 20 Feb 2024 08:02:29 -0800 Subject: [PATCH] test to see if this works on older versions of perl This declares a 'my' var within if parens for convenience; --- .perlcriticrc | 6 ++---- lib/Perl/Tidy/Tokenizer.pm | 7 ++++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.perlcriticrc b/.perlcriticrc index 77378139..f72c88a0 100644 --- a/.perlcriticrc +++ b/.perlcriticrc @@ -86,11 +86,9 @@ max_nests=9 [-ControlStructures::ProhibitCascadingIfElse] # This is a good general policy but the default max of 5 args is not always -# possible in time-critical subs. Two subs in perltidy have 10 args. -# When large numbers of args cannot be avoided, it works well to format them -# with one arg per line, and no trailing comma. +# possible in time-critical subs. One sub in perltidy has 11 args. [Subroutines::ProhibitManyArgs] -max_arguments = 10 +max_arguments = 11 skip_object = 1 [-ClassHierarchies::ProhibitExplicitISA] diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index 921428da..12885e70 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -6145,7 +6145,7 @@ EOM my $len_test = length($test_line); # check '$rtoken_map' and '$routput_token_list' - Fault(<Fault(<Fault("arg count $count expected to be $my_count\n"); + } + my $quoted_string; if ( $in_quote == 2 ) { # two quotes/quoted_string_1s to follow my $ibeg = $i; -- 2.39.5