]> git.donarmstrong.com Git - perltidy.git/commitdiff
fixed glitch processing multiple input values of -blil
authorSteve Hancock <perltidy@users.sourceforge.net>
Thu, 23 Apr 2020 01:02:50 +0000 (18:02 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Thu, 23 Apr 2020 01:02:50 +0000 (18:02 -0700)
lib/Perl/Tidy/Formatter.pm

index 20ca883c162cdac38b80e0fda04d9a39f7db999f..e35bea5b96db09ec30d58fd13d4c332e1ed909cf 100644 (file)
@@ -266,7 +266,6 @@ use vars qw{
   %want_left_space
   %want_right_space
   $bli_pattern
-  $bli_list_string
   %is_closing_type
   %is_opening_type
   %is_closing_token
@@ -308,9 +307,6 @@ BEGIN {
     };
     $NVARS = 1 + _TYPE_SEQUENCE_;
 
-    # default list of block types for which -bli would apply
-    $bli_list_string = 'if else elsif unless while for foreach do : sub';
-
     my @q;
 
     @q = qw(
@@ -4928,7 +4924,7 @@ sub set_leading_whitespace {
     # opening braces
     if (   $rOpts_brace_left_and_indent
         && $max_index_to_go == 0
-        && $block_type_to_go[$max_index_to_go] =~ /$bli_pattern/o )
+        && $block_type_to_go[$max_index_to_go] =~ /$bli_pattern/ )
     {
         $ci_level++;
     }
@@ -6330,6 +6326,9 @@ sub make_sub_matching_pattern {
 
 sub make_bli_pattern {
 
+    # default list of block types for which -bli would apply
+    my $bli_list_string = 'if else elsif unless while for foreach do : sub';
+
     if ( defined( $rOpts->{'brace-left-and-indent-list'} )
         && $rOpts->{'brace-left-and-indent-list'} )
     {
@@ -11178,7 +11177,7 @@ sub lookup_opening_indentation {
                 my $is_bli =
                      $rOpts_brace_left_and_indent
                   && $block_type_to_go[$i_terminal]
-                  && $block_type_to_go[$i_terminal] =~ /$bli_pattern/o;
+                  && $block_type_to_go[$i_terminal] =~ /$bli_pattern/;
 
                 if ( !$is_bli && defined($K_next_nonblank) ) {
                     my $lev        = $rLL->[$K_beg]->[_LEVEL_];