]> git.donarmstrong.com Git - perltidy.git/commitdiff
test to see if this works on older versions of perl
authorSteve Hancock <perltidy@users.sourceforge.net>
Tue, 20 Feb 2024 16:02:29 +0000 (08:02 -0800)
committerSteve Hancock <perltidy@users.sourceforge.net>
Tue, 20 Feb 2024 16:02:29 +0000 (08:02 -0800)
This declares a 'my' var within if parens for convenience;

.perlcriticrc
lib/Perl/Tidy/Tokenizer.pm

index 77378139809b23dd22aa70e7784dfeadbb3d86e4..f72c88a077d18e509c103927af2570981086c339 100644 (file)
@@ -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]
index 921428dad716643872ec538bd8fd9dcfec4b15a0..12885e704266ac25313fdae89cdfe35e32c9e45f 100644 (file)
@@ -6145,7 +6145,7 @@ EOM
                     my $len_test  = length($test_line);
 
                     # check '$rtoken_map' and '$routput_token_list'
-                    Fault(<<EOM);
+                    $self->Fault(<<EOM);
 Reconstruted line difers from input; input_length=$len_input test_length=$len_test
 input:'$input_line'
 test :'$test_line'
@@ -10239,6 +10239,11 @@ sub do_quote {
 
     ) = @_;
 
+    if ( DEVEL_MODE && @_ != ( my $my_count = 12 ) ) {
+        my $count = @_;
+        $self->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;