From: Steve Hancock Date: Wed, 20 Oct 2021 15:12:17 +0000 (-0700) Subject: improve alignment for sub calls without parens, issue c089 X-Git-Tag: 20211029~9 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1dffec548676ed7a3dc6bc5c2d574e54c999e31d;p=perltidy.git improve alignment for sub calls without parens, issue c089 --- diff --git a/CHANGES.md b/CHANGES.md index 1d4b2f92..7621f46e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,16 +6,16 @@ -bl (--opening-brace-on-new-line) flag applies. The new parameters are -block-left-list=s, or -bll=s, and --block-left-exclusion-list=s, or -blxl=s. Previously the -bl flag was 'hardwired' to apply to - nearly all blocks, and the default values of the new parameters + nearly all blocks. The default values of the new parameters retain the the old default behavior but allow it to be changed. - The default behavior of the -bli (-brace-left-and-indent) flag has changed - slightly. Previously, if you set -bli then the -bl flag would also + slightly. Previously, if you set -bli, then the -bl flag would also automatically be set. Consequently, block types which were not included in the default list for -bli would get -bl formatting. This is no longer done, and these two styles are now controlled independently. The manual describes - the controls. If you want to recover the previous default behavior exactly, - replace '-bli' with the pair '-bli -bl'. + the controls. If you want to recover the exact previous default behavior of + the -bli then add the -bl flag. - Partial fix issue for git #74, the -lp formatting style was being lost when a one-line anonymous sub was followed by a closing brace. @@ -24,7 +24,7 @@ Some unwanted vertical alignments of spaced function perens were being made. - - Update the man pages to clarify the flags -valign and -novalign + - Updated the man pages to clarify the flags -valign and -novalign for turning vertical alignment on and off (issue git #72). Added parameters -vc -vsc -vbc for separately turning off vertical alignment of code, side comments and block comments. @@ -33,13 +33,30 @@ comment, '#>>V', can be lost. A workaround for the previous version is to include the parameter '-mbl=2'. - - This version runs about 10 to 15 percent faster on large files than the + - Vertical alignment of function calls without parens has been improved + and is now closer to alignment results with parens. For example + + # OLD + mkTextConfig $c, $x, $y, -anchor => 'se', $color; + mkTextConfig $c, $x + 30, $y, -anchor => 's', $color; + mkTextConfig $c, $x + 60, $y, -anchor => 'sw', $color; + mkTextConfig $c, $x, $y + 30, -anchor => 'e', $color; + + # NEW + mkTextConfig $c, $x, $y, -anchor => 'se', $color; + mkTextConfig $c, $x + 30, $y, -anchor => 's', $color; + mkTextConfig $c, $x + 60, $y, -anchor => 'sw', $color; + mkTextConfig $c, $x, $y + 30, -anchor => 'e', $color; + + - This version runs 10 to 15 percent faster on large files than the previous release due to optimizations made with the help of NYTProf. - - This version was subjected to over 100 cpu hours of testing with random input - parameters with no instabilities or other irregularities seen. + - This version was subjected to over 200 cpu hours of testing with random input + parameters with no instabilities (metastable states) or other irregularities + seen. - - Numerous minor fixes have been made. A complete list is at: + - Numerous minor fixes have been made, mostly very rare formatting instabilities + found in random testing. A complete list is at: https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod diff --git a/docs/BugLog.html b/docs/BugLog.html index 9972013c..7296b11d 100644 --- a/docs/BugLog.html +++ b/docs/BugLog.html @@ -26,6 +26,153 @@
+
Issue c089, improve vertical alignment for lists without parens
+
+ +

An update was made to improve vertical alignment in situations where parens are omitted around lists. The goal is to make lists without parens align as they would if they were contained in parens. Some examples:

+ +
    # OLD, no parens, no alignment:
+    glVertex3d $cx + $s * $xs, $cy, $z;
+    glVertex3d $cx, $cy + $s * $ys, $z;
+    glVertex3d $cx - $s * $xs, $cy, $z;
+    glVertex3d $cx, $cy - $s * $ys, $z;
+
+    # OLD, with parens and aligned:
+    glVertex3d( $cx + $s * $xs, $cy,            $z );
+    glVertex3d( $cx,            $cy + $s * $ys, $z );
+    glVertex3d( $cx - $s * $xs, $cy,            $z );
+    glVertex3d( $cx,            $cy - $s * $ys, $z );
+
+    # NEW, no parens but aligned
+    glVertex3d $cx + $s * $xs, $cy,            $z;
+    glVertex3d $cx,            $cy + $s * $ys, $z;
+    glVertex3d $cx - $s * $xs, $cy,            $z;
+    glVertex3d $cx,            $cy - $s * $ys, $z;
+
+    # OLD
+    mkTextConfig $c, $x, $y, -anchor => 'se', $color;
+    mkTextConfig $c, $x + 30, $y, -anchor => 's',  $color;
+    mkTextConfig $c, $x + 60, $y, -anchor => 'sw', $color;
+    mkTextConfig $c, $x, $y + 30, -anchor => 'e', $color;
+
+    # NEW
+    mkTextConfig $c, $x,      $y,      -anchor => 'se', $color;
+    mkTextConfig $c, $x + 30, $y,      -anchor => 's',  $color;
+    mkTextConfig $c, $x + 60, $y,      -anchor => 'sw', $color;
+    mkTextConfig $c, $x,      $y + 30, -anchor => 'e',  $color;
+
+    # OLD
+    permute_test [ 'a', 'b', 'c' ],   '/', '/', [ 'a', 'b', 'c' ];
+    permute_test [ 'a,', 'b', 'c,' ], '/', '/', [ 'a,', 'b', 'c,' ];
+    permute_test [ 'a', ',', '#', 'c' ], '/', '/', [ 'a', ',', '#', 'c' ];
+    permute_test [ 'f_oo', 'b_ar' ], '/', '/', [ 'f_oo', 'b_ar' ];
+
+    # NEW
+    permute_test [ 'a', 'b', 'c' ],      '/', '/', [ 'a', 'b', 'c' ];
+    permute_test [ 'a,', 'b', 'c,' ],    '/', '/', [ 'a,', 'b', 'c,' ];
+    permute_test [ 'a', ',', '#', 'c' ], '/', '/', [ 'a', ',', '#', 'c' ];
+    permute_test [ 'f_oo', 'b_ar' ],     '/', '/', [ 'f_oo', 'b_ar' ];
+
+    # OLD:
+    is $thingy, "fee",           "source filters apply to evalbytten strings";
+    is "foo",   $unfiltered_foo, 'filters leak not out of byte evals';
+    is $av->[2], "NAME:my_xop",          "OP_NAME returns registered name";
+    is $av->[3], "DESC:XOP for testing", "OP_DESC returns registered desc";
+    is $av->[4], "CLASS:$OA_UNOP",       "OP_CLASS returns registered class";
+    is scalar @$av, 7, "registered peep called";
+    is $av->[5], "peep:$unop", "...with correct 'o' param";
+    is $av->[6], "oldop:$kid", "...and correct 'oldop' param";
+
+    # NEW
+    is $av->[2],    "NAME:my_xop",          "OP_NAME returns registered name";
+    is $av->[3],    "DESC:XOP for testing", "OP_DESC returns registered desc";
+    is $av->[4],    "CLASS:$OA_UNOP",       "OP_CLASS returns registered class";
+    is scalar @$av, 7,                      "registered peep called";
+    is $av->[5],    "peep:$unop",           "...with correct 'o' param";
+    is $av->[6],    "oldop:$kid",           "...and correct 'oldop' param";
+ +

17 Oct 2021.

+ +
+
Issue c087, breaking after anonymous sub
+
+ +

This update keeps both of these configurations stable for all cases except when the -lp option is used. For the -lp option, both become one-line blocks (the second case) to prevents the -lp indentation style from being lost. This update was made to minimize changes to existing formatting.

+ +
    $obj = {
+        foo => sub { "bar" }
+    };
+
+    $obj = { foo => sub { "bar" } };
+ +

17 Oct 2021, f05e6b5.

+ +
+
Improve formatting of some Moose structures
+
+ +

In some structures used in Moose coding, some asymmetrical container breaks were being caused by the braces being tokenized as hash braces rather than block braces. This was also causing some unwanted warning messages.

+ +
    # OLD
+    ::is(
+        ::exception { has '+bar' => ( default => sub { 100 } );
+        },
+        undef,
+        '... extended the attribute successfully'
+    );
+
+    # NEW
+    ::is(
+        ::exception {
+            has '+bar' => ( default => sub { 100 } );
+        },
+        undef,
+        '... extended the attribute successfully'
+    );
+ +

This fixes issue c074.

+ +

12 Oct 2021, 7e873fa.

+ +
+
Fix issue c081, -cscw preventing deletion of closing side comments
+
+ +

Random testing revealed a problem in which an old closing side comment was not being deleted when it fell below the interval specified on -csci=n and the -cscw flag was also set.

+ +

For example, the following snippet has been formatted with -csc -csci=1. The interval -csci=1 insures that all blocks get side comments:

+ +
    if ($x3) {
+        $zz;
+        if ($x2) {
+            if ($x1) {
+                ..;
+            } ## end if ($x1)
+            $a;
+            $b;
+            $c;
+        } ## end if ($x2)
+    } ## end if ($x3)
+ +

If we then run with -csc -csci=6, the comment ## end if ($x1) will fall below the threshold and be removed (correctly):

+ +
    if ($x3) {
+        $zz;
+        if ($x2) {
+            if ($x1) {
+                ..;
+            }
+            $a;
+            $b;
+            $c;
+        } ## end if ($x2)
+    } ## end if ($x3)
+ +

But if we also add the -cscw flag (warnings) then it was not being removed. This update fixes this problem (issue c081).

+ +

2 Oct 2021, 25ef8e8

+ +
Partial fix for issue git #74 on -lp at anonymous subs
@@ -55,7 +202,7 @@

But note that this only applies to one-line anonymous subs. If an anonymous sub is broken into several lines due to its length or complexity, then these forced line breaks cause indentation to revert to the standard indentation scheme.

-

22 Sep 2021.

+

22 Sep 2021, 4fd58f7.

@@ -63,7 +210,7 @@

Testing with random parameters produced a formatting instability related to the -vmll flag. The problem was due to a subtle difference in the definition of nesting depth and indentation level. The vertical aligner was using nesting depth instead of indentation level to compute the maximum line length when -vmll is set. In some rare cases there is a difference. The problem was fixed by passing the maximum line length to the vertical aligner so that the calculation is only done in the formatter. This fixes b1209.

-

20 Sep 2021.

+

20 Sep 2021, acf1d2d.

Fix issue b1208
diff --git a/docs/ChangeLog.html b/docs/ChangeLog.html index 40ed7b66..49a4ec9f 100644 --- a/docs/ChangeLog.html +++ b/docs/ChangeLog.html @@ -2,14 +2,29 @@

2021 07 17.04

-
- Partial fix issue for git #74, the -lp formatting style was
+
- Added two new parameters to control the block types to which the
+  -bl (--opening-brace-on-new-line) flag applies.  The new parameters are
+  -block-left-list=s, or -bll=s, and --block-left-exclusion-list=s,
+  or -blxl=s.  Previously the -bl flag was 'hardwired' to apply to
+  nearly all blocks. The default values of the new parameters
+  retain the the old default behavior but allow it to be changed.
+
+- The default behavior of the -bli (-brace-left-and-indent) flag has changed
+  slightly.  Previously, if you set -bli, then the -bl flag would also
+  automatically be set.  Consequently, block types which were not included
+  in the default list for -bli would get -bl formatting.  This is no longer done,
+  and these two styles are now controlled independently.  The manual describes
+  the controls.  If you want to recover the exact previous default behavior of
+  the -bli then add the -bl flag.
+
+- Partial fix issue for git #74, the -lp formatting style was
   being lost when a one-line anonymous sub was followed by a closing brace.
 
 - Fix issue git #73, the -nfpva flag was not working correctly.
   Some unwanted vertical alignments of spaced function perens
   were being made.
 
-- Update the man pages to clarify the flags -valign and -novalign
+- Updated the man pages to clarify the flags -valign and -novalign
   for turning vertical alignment on and off (issue git #72).
   Added parameters -vc -vsc -vbc for separately turning off vertical
   alignment of code, side comments and block comments.
@@ -18,7 +33,14 @@
   comment, '#>>V', can be lost.  A workaround for the previous version
   is to include the parameter '-mbl=2'.
 
-- Numerous minor fixes have been made. A complete list is at:
+- This version runs 10 to 15 percent faster on large files than the
+  previous release due to optimizations made with the help of NYTProf.
+
+- This version was subjected to over 100 cpu hours of testing with random input
+  parameters with no instabilities or other irregularities seen.
+
+- Numerous minor fixes have been made, mostly very rare formatting instabilities
+  found in random testing. A complete list is at:
 
        https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod
 
diff --git a/docs/perltidy.html b/docs/perltidy.html index 83c7c628..beae8e61 100644 --- a/docs/perltidy.html +++ b/docs/perltidy.html @@ -326,7 +326,7 @@

For example,

-
        perltidy -sal='method fun _sub M4' 
+
        perltidy -sal='method fun _sub M4'

will cause the perltidy to treate the words 'method', 'fun', '_sub' and 'M4' to be treated the same as if they were 'sub'. Note that if the alias words are separated by spaces then the string of words should be placed in quotes.

@@ -542,12 +542,12 @@

Continuation indentation is extra indentation spaces applied when a long line is broken. The default is n=2, illustrated here:

-
 my $level =   # -ci=2      
+
 my $level =   # -ci=2
    ( $max_index_to_go >= 0 ) ? $levels_to_go[0] : $last_output_level;

The same example, with n=0, is a little harder to read:

-
 my $level =   # -ci=0    
+
 my $level =   # -ci=0
  ( $max_index_to_go >= 0 ) ? $levels_to_go[0] : $last_output_level;

The value given to -ci is also used by some commands when a small space is required. Examples are commands for outdenting labels, -ola, and control keywords, -okw.

@@ -851,7 +851,7 @@
 $width = $col[ $j + $k ] - $col[ $j ];  # -sbt=0
  $width = $col[ $j + $k ] - $col[$j];    # -sbt=1 (default)
- $width = $col[$j + $k] - $col[$j];      # -sbt=2 
+ $width = $col[$j + $k] - $col[$j]; # -sbt=2

Curly braces which do not contain code blocks are controlled by the parameter -bt=n or --brace-tightness=n.

@@ -873,7 +873,7 @@

The flag -tso causes certain perl token sequences (secret operators) which might be considered to be a single operator to be formatted "tightly" (without spaces). The operators currently modified by this flag are:

-
     0+  +0  ()x!! ~~<>  ,=>   =( )=  
+
     0+  +0  ()x!! ~~<>  ,=>   =( )=

For example the sequence 0 +, which converts a string to a number, would be formatted without a space: 0+ when the -tso flag is set. This flag is off by default.

@@ -1025,7 +1025,7 @@

When an opening paren follows a Perl keyword, no space is introduced after the keyword, unless it is (by default) one of these:

-
   my local our and or xor eq ne if else elsif until unless 
+
   my local our and or xor eq ne if else elsif until unless
    while for foreach return switch case given when

These defaults can be modified with two commands:

@@ -1063,7 +1063,7 @@

-sfp or --space-function-paren

-
  myfunc( $a, $b, $c );    # default 
+
  myfunc( $a, $b, $c );    # default
   myfunc ( $a, $b, $c );   # -sfp

You will probably also want to use the flag -skp (previous item) too.

@@ -1149,7 +1149,7 @@

In the following example some extra space has been inserted on the second line between the two open parens. This extra space is called "logical padding" and is intended to help align similar things vertically in some logical or ternary expressions.

-
    # perltidy [default formatting] 
+
    # perltidy [default formatting]
     $same =
       (      ( $aP eq $bP )
           && ( $aS eq $bS )
@@ -1161,7 +1161,7 @@
 
 

Here is an example involving a ternary operator:

-
    # perltidy [default formatting] 
+
    # perltidy [default formatting]
     $bits =
         $top > 0xffff ? 32
       : $top > 0xff   ? 16
@@ -1281,8 +1281,7 @@
 
 
     perltidy -l=80
         $vmsfile =~ s/;[\d\-]*$//
-          ;    # Clip off version number; we can use a newer version as well
-   
+ ; # Clip off version number; we can use a newer version as well
-hsc, --hanging-side-comments
@@ -1483,7 +1482,7 @@
    @month_of_year = (   # -nsbc
         'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct',
-  
+
         ##  'Dec', 'Nov'
         'Nov', 'Dec'
     );
@@ -1500,7 +1499,7 @@

A pattern which can be useful is:

-
    -sbcp=^#{2,}[^\s#] 
+
    -sbcp=^#{2,}[^\s#]

This pattern requires a static block comment to have at least one character which is neither a # nor a space. It allows a line containing only '#' characters to be rejected as a static block comment. Such lines are often used at the start and end of header information in subroutines and should not be separated from the intervening comments, which typically begin with just a single '#'.

@@ -1607,7 +1606,7 @@
 -fsb='#\{\{\{' becomes /^#\{\{\{\s/  which matches  #{{{ but not #{{{{
  -fsb='#\*\*'   becomes /^#\*\*\s/    which matches  #** but not #***
- -fsb='#\*{2,}' becomes /^#\*{2,}\s/  which matches  #** and #***** 
+ -fsb='#\*{2,}' becomes /^#\*{2,}\s/ which matches #** and #*****
-fse=string, --format-skipping-end=string
@@ -1662,7 +1661,7 @@
  # -ce
   if ($task) {
       yyy();
-  } else {    
+  } else {
       zzz();
   }
 
@@ -1670,7 +1669,7 @@
   if ($task) {
         yyy();
   }
-  else {    
+  else {
         zzz();
   }
@@ -1707,7 +1706,7 @@

or equivalently

-
  -cbl=sort,map,grep 
+
  -cbl=sort,map,grep

Note however that these particular block types are typically short so there might not be much opportunity for the cuddled format style.

@@ -1732,7 +1731,7 @@

Cuddled formatting is only possible between a pair of code blocks if the closing brace of the first block starts a new line. If a block is encountered which is entirely on a single line, and cuddled formatting is selected, it is necessary to make a decision as to whether or not to "break" the block, meaning to cause it to span multiple lines. This parameter controls that decision. The options are:

   cbo=0  Never force a short block to break.
-   cbo=1  If the first of a pair of blocks is broken in the input file, 
+   cbo=1  If the first of a pair of blocks is broken in the input file,
           then break the second [DEFAULT].
    cbo=2  Break open all blocks for maximal cuddled formatting.
@@ -1743,27 +1742,48 @@

The option cbo=2 produces maximal cuddling but will not allow any short blocks.

-
-bl, --opening-brace-on-new-line
+
-bl, --opening-brace-on-new-line, or --brace-left
-

Use the flag -bl to place the opening brace on a new line:

+

Use the flag -bl to place an opening block brace on a new line:

-
  if ( $input_file eq '-' )    # -bl 
-  {                          
-      important_function();
+
  if ( $input_file eq '-' )
+  {
+      ...
   }
-

This flag applies to all structural blocks, including named sub's (unless the -sbl flag is set -- see next item).

+

By default it applies to all structural blocks except sort map grep eval and anonymous subs.

+ +

The default is -nbl which places an opening brace on the same line as the keyword introducing it if possible. For example,

+ +
  # default
+  if ( $input_file eq '-' ) {
+     ...
+  }
-

The default style, -nbl, places an opening brace on the same line as the keyword introducing it. For example,

+

When -bl is set, the blocks to which this applies can be controlled with the parameters --brace-left-list and -brace-left-exclusion-list described in the next sections.

+ +
+
-bll=s, --brace-left-list=s
+
-
  if ( $input_file eq '-' ) {   # -nbl (default)
+

Use this parameter to change the types of block braces for which the -bl flag applies; see "Specifying Block Types". For example, -bll='if elsif else sub' would apply it to only if/elsif/else and named sub blocks. The default is all blocks, -bll='*'.

+ +
+
-blxl=s, --brace-left-exclusion-list=s
+
+ +

Use this parameter to exclude types of block braces for which the -bl flag applies; see "Specifying Block Types". For example, the default settings -bll='*' and -blxl='sort map grep eval asub' mean all blocks except sort map grep eval and anonymous sub blocks.

+ +

Note that the lists -bll=s and -blxl=s control the behavior of the -bl flag but have no effect unless the -bl flag is set.

-sbl, --opening-sub-brace-on-new-line
-

The flag -sbl can be used to override the value of -bl for the opening braces of named sub's. For example,

+

The flag -sbl provides a shortcut way to turn on -bl just for named subs. The same effect can be achieved by turning on -bl with the block list set as -bll='sub'.

+ +

For example,

 perltidy -sbl
@@ -1779,7 +1799,7 @@ } }
-

This flag is negated with -nsbl. If -sbl is not specified, the value of -bl is used.

+

This flag is negated with -nsbl, which is the default.

-asbl, --opening-anonymous-sub-brace-on-new-line
@@ -1807,22 +1827,36 @@
-bli, --brace-left-and-indent
-

The flag -bli is the same as -bl but in addition it causes one unit of continuation indentation ( see -ci ) to be placed before an opening and closing block braces.

+

The flag -bli is similar to the -bl flag but in addition it causes one unit of continuation indentation ( see -ci ) to be placed before an opening and closing block braces.

-

For example,

+

For example, perltidy -bli gives

-
        if ( $input_file eq '-' )    # -bli
+
        if ( $input_file eq '-' )
           {
             important_function();
           }
-

By default, this extra indentation occurs for blocks of type: if, elsif, else, unless, for, foreach, sub, while, until, and also with a preceding label. The next item shows how to change this.

+

By default, this extra indentation occurs for block types: if, elsif, else, unless, while, for, foreach, do, and also named subs and blocks preceded by a label. The next item shows how to change this.

+ +

Note: The -bli flag is similar to the -bl flag, with the difference being that braces get indented. But these two flags are implemented independently, and have different default settings for historical reasons. If desired, a mixture of effects can be achieved if desired by turning them both on with different -list settings. In the event that both settings are selected for a certain block type, the -bli style has priority.

-blil=s, --brace-left-and-indent-list=s
-

Use this parameter to change the types of block braces for which the -bli flag applies; see "Specifying Block Types". For example, -blil='if elsif else' would apply it to only if/elsif/else blocks.

+

Use this parameter to change the types of block braces for which the -bli flag applies; see "Specifying Block Types".

+ +

The default is -blil='if else elsif unless while for foreach do : sub'.

+ +
+
-blixl=s, --brace-left-and-indent-exclusion-list=s
+
+ +

Use this parameter to exclude types of block braces for which the -bli flag applies; see "Specifying Block Types".

+ +

This might be useful in conjunction with selecting all blocks -blil='*'. The default setting is -blixl=' ', which does not exclude any blocks.

+ +

Note that the two parameters -blil and -blixl control the behavior of the -bli flag but have no effect unless the -bli flag is set.

-bar, --opening-brace-always-on-right
@@ -2010,7 +2044,7 @@
        # default formatting
         do {
             {
-                next if $x == $y;    
+                next if $x == $y;
             }
         } until $x++ > $z;
 
@@ -2128,7 +2162,7 @@
 
 

For example, compare

-
        # perltidy -wn 
+
        # perltidy -wn
         if ( defined( $_Cgi_Query{
             $Config{'methods'}{'authentication'}{'remote'}{'cgi'}{'username'}
         } ) )
@@ -2164,8 +2198,8 @@
  • Opening tokens (except for block braces) are controlled by -vt=n, or --vertical-tightness=n, where

    -
     -vt=0 always break a line after opening token (default). 
    - -vt=1 do not break unless this would produce more than one 
    +
     -vt=0 always break a line after opening token (default).
    + -vt=1 do not break unless this would produce more than one
              step in indentation in a line.
      -vt=2 never break a line after opening token
    @@ -2175,9 +2209,9 @@
  • Closing tokens (except for block braces) are controlled by -vtc=n, or --vertical-tightness-closing=n, where

    -
     -vtc=0 always break a line before a closing token (default), 
    - -vtc=1 do not break before a closing token which is followed 
    -        by a semicolon or another closing token, and is not in 
    +
     -vtc=0 always break a line before a closing token (default),
    + -vtc=1 do not break before a closing token which is followed
    +        by a semicolon or another closing token, and is not in
             a list environment.
      -vtc=2 never break before a closing token.
      -vtc=3 Like -vtc=1 except always break before a closing token
    @@ -2236,14 +2270,14 @@
     
     

    The difference between -vt=1 and -vt=2 is shown here:

    -
        # perltidy -lp -vt=1 
    +
        # perltidy -lp -vt=1
         $init->add(
                     mysprintf( "(void)find_threadsv(%s);",
                                cstring( $threadsv_names[ $op->targ ] )
                     )
         );
     
    -    # perltidy -lp -vt=2 
    +    # perltidy -lp -vt=2
         $init->add( mysprintf( "(void)find_threadsv(%s);",
                                cstring( $threadsv_names[ $op->targ ] )
                     )
    @@ -2275,8 +2309,8 @@
     
     

    The -bbvt=n flag is just like the -vt=n flag but applies to opening code block braces.

    -
     -bbvt=0 break after opening block brace (default). 
    - -bbvt=1 do not break unless this would produce more than one 
    +
     -bbvt=0 break after opening block brace (default).
    + -bbvt=1 do not break unless this would produce more than one
              step in indentation in a line.
      -bbvt=2 do not break after opening block brace.
    @@ -2451,7 +2485,7 @@

    The -baao sets the default to be to break after all of the following operators:

    -
        % + - * / x != == >= <= =~ !~ < > | & 
    +
        % + - * / x != == >= <= =~ !~ < > | &
         = **= += *= &= <<= &&= -= /= |= >>= ||= //= .= %= ^= x=
         . : ? && || and or err xor
    @@ -2514,7 +2548,7 @@

    If the computed number of fields for any table exceeds n, then it will be reduced to n. The default value for n is a large number, 40. While this value should probably be left unchanged as a general rule, it might be used on a small section of code to force a list to have a particular number of fields per line, and then either the -boc flag could be used to retain this formatting, or a single comment could be introduced somewhere to freeze the formatting in future applications of perltidy.

        # perltidy -mft=2
    -    @month_of_year = (    
    +    @month_of_year = (
             'Jan', 'Feb',
             'Mar', 'Apr',
             'May', 'Jun',
    @@ -2529,12 +2563,12 @@
     
     

    A comma which follows a comma arrow, '=>', is given special consideration. In a long list, it is common to break at all such commas. This parameter can be used to control how perltidy breaks at these commas. (However, it will have no effect if old comma breaks are being forced because -boc is used). The possible values of n are:

    -
     n=0 break at all commas after =>  
    +
     n=0 break at all commas after =>
      n=1 stable: break at all commas after => if container is open,
          EXCEPT FOR one-line containers
      n=2 break at all commas after =>, BUT try to form the maximum
          one-line container lengths
    - n=3 do not treat commas after => specially at all 
    + n=3 do not treat commas after => specially at all
      n=4 break everything: like n=0 but ALSO break a short container with
          a => not followed by a comma when -vt=0 is used
      n=5 stable: like n=1 but ALSO break at open one-line containers when
    @@ -2583,7 +2617,7 @@
     
     

    For example, given this snippet:

    -
        return unless $cmd = $cmd || ($dot 
    +
        return unless $cmd = $cmd || ($dot
             && $Last_Shell) || &prompt('|');
     
         # perltidy -bol [default]
    @@ -3037,7 +3071,7 @@
     

    -pbp is an abbreviation for the parameters in the book Perl Best Practices by Damian Conway:

        -l=78 -i=4 -ci=4 -st -se -vt=2 -cti=0 -pt=1 -bt=1 -sbt=1 -bbt=1 -nsfs -nolq
    -    -wbb="% + - * / x != == >= <= =~ !~ < > | & = 
    +    -wbb="% + - * / x != == >= <= =~ !~ < > | & =
               **= += *= &= <<= &&= -= /= |= >>= ||= //= .= %= ^= x="

    Please note that this parameter set includes -st and -se flags, which make perltidy act as a filter on one file only. These can be overridden by placing -nst and/or -nse after the -pbp parameter.

    @@ -3087,6 +3121,8 @@

    There are a few points to note regarding one-line blocks. A one-line block is something like this,

    +
        if ( -e $file ) { print "'$file' exists\n" }
    +

    where the contents within the curly braces is short enough to fit on a single line.

    With few exceptions, perltidy retains existing one-line blocks, if it is possible within the line-length constraint, but it does not attempt to form new ones. In other words, perltidy will try to follow the one-line block style of the input file.

    @@ -3165,7 +3201,7 @@

    Vertical alignment refers to lining up certain symbols in a list of consecutive similar lines to improve readability. For example, the "fat commas" are aligned in the following statement:

            $data = $pkg->new(
    -            PeerAddr => join( ".", @port[ 0 .. 3 ] ),   
    +            PeerAddr => join( ".", @port[ 0 .. 3 ] ),
                 PeerPort => $port[4] * 256 + $port[5],
                 Proto    => 'tcp'
             );
    @@ -3478,13 +3514,13 @@

    Most of the flags accepted by pod2html may be included in the perltidy command line, and they will be passed to pod2html. In some cases, the flags have a prefix pod to emphasize that they are for the pod2html, and this prefix will be removed before they are passed to pod2html. The flags which have the additional pod prefix are:

    -
       --[no]podheader --[no]podindex --[no]podrecurse --[no]podquiet 
    +
       --[no]podheader --[no]podindex --[no]podrecurse --[no]podquiet
        --[no]podverbose --podflush

    The flags which are unchanged from their use in pod2html are:

       --backlink=s --cachedir=s --htmlroot=s --libpods=s --title=s
    -   --podpath=s --podroot=s 
    + --podpath=s --podroot=s

    where 's' is an appropriate character string. Not all of these flags are available in older versions of Pod::Html. See your Pod::Html documentation for more information.

    @@ -3544,7 +3580,7 @@

    Syntax colors may be changed from their default values by flags of the either the long form, -html-color-xxxxxx=n, or more conveniently the short form, -hcx=n, where xxxxxx is one of the following words, and x is the corresponding abbreviation:

    -
          Token Type             xxxxxx           x 
    +
          Token Type             xxxxxx           x
           ----------             --------         --
           comment                comment          c
           number                 numeric          n
    diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm
    index 3f04f031..a125cbb7 100644
    --- a/lib/Perl/Tidy/Formatter.pm
    +++ b/lib/Perl/Tidy/Formatter.pm
    @@ -15464,9 +15464,9 @@ sub break_equals {
     
                 # recombine the pair with the greatest bond strength
                 if ($n_best) {
    -                splice @{$ri_beg}, $n_best, 1;
    +                splice @{$ri_beg}, $n_best,     1;
                     splice @{$ri_end}, $n_best - 1, 1;
    -                splice @joint, $n_best, 1;
    +                splice @joint,     $n_best,     1;
     
                     # keep going if we are still making progress
                     $more_to_do++;
    @@ -20609,7 +20609,8 @@ EOM
             my ( $self, $ri_first, $ri_last ) = @_;
     
             my $ralignment_type_to_go;
    -        my $ralignment_counts = [];
    +        my $ralignment_counts       = [];
    +        my $ralignment_hash_by_line = [];
     
             # NOTE: closing side comments can insert up to 2 additional tokens
             # beyond the original $max_index_to_go, so we need to check ri_last for
    @@ -20624,7 +20625,8 @@ EOM
             #    - and nothing to do if we aren't allowed to change whitespace.
             # -----------------------------------------------------------------
             if ( $max_i <= 0 || !$rOpts_add_whitespace ) {
    -            return ( $ralignment_type_to_go, $ralignment_counts );
    +            return ( $ralignment_type_to_go, $ralignment_counts,
    +                $ralignment_hash_by_line );
             }
     
             my $rspecial_side_comment_type = $self->[_rspecial_side_comment_type_];
    @@ -20686,6 +20688,7 @@ EOM
     
                 if ( !$do_not_align ) {
                     $ralignment_type_to_go->[$max_i] = '#';
    +                $ralignment_hash_by_line->[$max_line]->{$max_i} = '#';
                     $ralignment_counts->[$max_line]++;
                 }
             }
    @@ -20694,7 +20697,8 @@ EOM
             # Nothing more to do on this line if -nvc is set
             # ----------------------------------------------
             if ( !$rOpts_valign_code ) {
    -            return ( $ralignment_type_to_go, $ralignment_counts );
    +            return ( $ralignment_type_to_go, $ralignment_counts,
    +                $ralignment_hash_by_line );
             }
     
             # -------------------------------------
    @@ -20806,6 +20810,7 @@ EOM
                             if ( $ralignment_type_to_go->[$imate] ) {
                                 $ralignment_type_to_go->[$imate] = '';
                                 $ralignment_counts->[$line]--;
    +                            delete $ralignment_hash_by_line->[$line]->{$imate};
                             }
                             pop @imatch_list;
                         }
    @@ -20983,6 +20988,8 @@ EOM
                         }
                         else {
                             $ralignment_type_to_go->[$i] = $alignment_type;
    +                        $ralignment_hash_by_line->[$line]->{$i} =
    +                          $alignment_type;
                             $ralignment_counts->[$line]++;
                             push @imatch_list, $i;
                         }
    @@ -20992,7 +20999,9 @@ EOM
                     $vert_last_nonblank_token = $token;
                 }
             }
    -        return ( $ralignment_type_to_go, $ralignment_counts );
    +
    +        return ( $ralignment_type_to_go, $ralignment_counts,
    +            $ralignment_hash_by_line );
         } ## end sub set_vertical_alignment_markers
     } ## end closure set_vertical_alignment_markers
     
    @@ -21030,10 +21039,8 @@ sub make_vertical_alignments {
         #---------------------------------------------------------
         # Step 1: Define the alignment tokens for the entire batch
         #---------------------------------------------------------
    -    my $ralignment_type_to_go = [];
    -    my $ralignment_counts     = [];
    -    ( $ralignment_type_to_go, $ralignment_counts ) =
    -      $self->set_vertical_alignment_markers( $ri_first, $ri_last );
    +    my ( $ralignment_type_to_go, $ralignment_counts, $ralignment_hash_by_line )
    +      = $self->set_vertical_alignment_markers( $ri_first, $ri_last );
     
         #----------------------------------------------
         # Step 2: Break each line into alignment fields
    @@ -21044,9 +21051,12 @@ sub make_vertical_alignments {
     
             my $ibeg = $ri_first->[$line];
             my $iend = $ri_last->[$line];
    -        my $rtok_fld_pat_len =
    -          $self->make_alignment_patterns( $ibeg, $iend,
    -            $ralignment_type_to_go, $ralignment_counts->[$line] );
    +
    +        my $rtok_fld_pat_len = $self->make_alignment_patterns(
    +            $ibeg, $iend, $ralignment_type_to_go,
    +            $ralignment_counts->[$line],
    +            $ralignment_hash_by_line->[$line]
    +        );
             push @{$rline_alignments}, $rtok_fld_pat_len;
         }
         return $rline_alignments;
    @@ -21854,6 +21864,12 @@ sub pad_token {
         my %keyword_map;
         my %operator_map;
         my %is_w_n_C;
    +    my %is_my_local_our;
    +    my %is_kwU;
    +    my %is_use_like;
    +    my %is_binary_type;
    +    my %is_binary_keyword;
    +    my %name_map;
     
         BEGIN {
     
    @@ -21898,6 +21914,42 @@ sub pad_token {
                 'n' => 1,
                 'C' => 1,
             );
    +
    +        # leading keywords which to skip for efficiency when making parenless
    +        # container names
    +        my @q = qw( my local our return );
    +        @{is_my_local_our}{@q} = (1) x scalar(@q);
    +
    +        # leading keywords where we should just join one token to form
    +        # parenless name
    +        @q = qw( use );
    +        @{is_use_like}{@q} = (1) x scalar(@q);
    +
    +        # leading token types which may be used to make a container name
    +        @q = qw( k w U );
    +        @{is_kwU}{@q} = (1) x scalar(@q);
    +
    +        # token types which prevent using leading word as a container name
    +        @q = qw(
    +          x / : % . | ^ < = > || >= != *= => !~ == && |= .= -= =~ += <= %= ^= x= ~~ ** << /=
    +          &= // >> ~. &. |. ^.
    +          **= <<= >>= &&= ||= //= <=> !~~ &.= |.= ^.= <<~
    +        );
    +        push @q, ',';
    +        @{is_binary_type}{@q} = (1) x scalar(@q);
    +
    +        # token keywords which prevent using leading word as a container name
    +        @_ = qw(and or err eq ne cmp);
    +        @is_binary_keyword{@_} = (1) x scalar(@_);
    +
    +        # Some common function calls whose args can be aligned.  These do not
    +        # give good alignments if the lengths differ significantly.
    +        %name_map = (
    +            'unlike' => 'like',
    +            'isnt'   => 'is',
    +            ##'is_deeply' => 'is',   # poor; names lengths too different
    +        );
    +
         }
     
         sub make_alignment_patterns {
    @@ -21923,8 +21975,29 @@ sub pad_token {
             #   allowed, even when the alignment tokens match.
             # @field_lengths - the display width of each field
     
    -        my ( $self, $ibeg, $iend, $ralignment_type_to_go, $alignment_count ) =
    -          @_;
    +        my ( $self, $ibeg, $iend, $ralignment_type_to_go, $alignment_count,
    +            $ralignment_hash )
    +          = @_;
    +
    +        # The var $ralignment_hash contains all of the alignments for this
    +        # line.  It is not yet used but is available for future coding in case
    +        # there is a need to do a preliminary scan of the alignment tokens.
    +        if (DEVEL_MODE) {
    +            my $new_count = 0;
    +            if ( defined($ralignment_hash) ) {
    +                $new_count = keys %{$ralignment_hash};
    +            }
    +            my $old_count = $alignment_count;
    +            $old_count = 0 unless ($old_count);
    +            if ( $new_count != $old_count ) {
    +                my $K   = $K_to_go[$ibeg];
    +                my $rLL = $self->[_rLL_];
    +                my $lnl = $rLL->[$K]->[_LINE_INDEX_];
    +                Fault(
    +"alignment hash token count gives count=$new_count but old count is $old_count near line=$lnl\n"
    +                );
    +            }
    +        }
     
             # -------------------------------------
             # Shortcut for lines without alignments
    @@ -21955,12 +22028,86 @@ sub pad_token {
             my @patterns      = ();
             my @field_lengths = ();
     
    -        # For a 'use' statement, use the module name as container name.
    -        # Fixes issue rt136416.
    -        if ( $types_to_go[$ibeg] eq 'k' && $tokens_to_go[$ibeg] eq 'use' ) {
    -            my $inext = $inext_to_go[$ibeg];
    -            if ( $inext <= $iend ) {
    -                $container_name{'0'} = $tokens_to_go[$inext];
    +        #-------------------------------------------------------------
    +        # Make a container name for any uncontained commas, issue c089
    +        #-------------------------------------------------------------
    +        # This is a generalization of the fix for rt136416 which was a
    +        # specialized patch just for 'use Module' statements.
    +        # We restrict this to semicolon-terminated statements; that way
    +        # we know that the top level commas are not in a list container.
    +        if ( $ibeg == 0 && $iend == $max_index_to_go ) {
    +            my $iterm = $max_index_to_go;
    +            if ( $types_to_go[$iterm] eq '#' ) {
    +                $iterm = $iprev_to_go[$iterm];
    +            }
    +            if (   $iterm > $ibeg
    +                && $types_to_go[$iterm] eq ';'
    +                && !$is_my_local_our{ $tokens_to_go[$ibeg] }
    +                && $levels_to_go[$ibeg] eq $levels_to_go[$iterm] )
    +            {
    +
    +                # Make a container name by combining all leading barewords,
    +                # keywords and functions.
    +                my $name  = "";
    +                my $count = 0;
    +                my $count_max;
    +                my $iname_end;
    +                my $ilast_blank;
    +                for ( $ibeg .. $iterm ) {
    +                    my $type = $types_to_go[$_];
    +
    +                    if ( $type eq 'b' ) {
    +                        $ilast_blank = $_;
    +                        next;
    +                    }
    +
    +                    my $token = $tokens_to_go[$_];
    +
    +                    # Give up if we find an opening paren, binary operator or
    +                    # comma within or after the proposed container name.
    +                    if (   $token eq '('
    +                        || $is_binary_type{$type}
    +                        || $type eq 'k' && $is_binary_keyword{$token} )
    +                    {
    +                        $name = "";
    +                        last;
    +                    }
    +
    +                    # The container name is only built of certain types:
    +                    last if ( !$is_kwU{$type} );
    +
    +                    # Normally it is made of one word, but two words for 'use'
    +                    if ( $count == 0 ) {
    +                        if (   $type eq 'k'
    +                            && $is_use_like{ $tokens_to_go[$_] } )
    +                        {
    +                            $count_max = 2;
    +                        }
    +                        else {
    +                            $count_max = 1;
    +                        }
    +                    }
    +                    elsif ( defined($count_max) && $count >= $count_max ) {
    +                        last;
    +                    }
    +
    +                    if ( defined( $name_map{$token} ) ) {
    +                        $token = $name_map{$token};
    +                    }
    +
    +                    $name .= ' ' . $token;
    +                    $iname_end = $_;
    +                    $count++;
    +                }
    +
    +                # Require a space after the container name token(s)
    +                if (   $name
    +                    && defined($ilast_blank)
    +                    && $ilast_blank > $iname_end )
    +                {
    +                    $name = substr( $name, 1 );
    +                    $container_name{'0'} = $name;
    +                }
                 }
             }
     
    diff --git a/local-docs/BugLog.pod b/local-docs/BugLog.pod
    index 7527bf79..97aae3de 100644
    --- a/local-docs/BugLog.pod
    +++ b/local-docs/BugLog.pod
    @@ -2,6 +2,90 @@
     
     =over 4
     
    +=item B
    +
    +An update was made to improve vertical alignment in situations where parens
    +are omitted around lists.  The goal is to make lists without parens align
    +as they would if they were contained in parens.  Some examples:
    +
    +    # OLD, no parens, no alignment:
    +    glVertex3d $cx + $s * $xs, $cy, $z;
    +    glVertex3d $cx, $cy + $s * $ys, $z;
    +    glVertex3d $cx - $s * $xs, $cy, $z;
    +    glVertex3d $cx, $cy - $s * $ys, $z;
    +
    +    # OLD, with parens and aligned:
    +    glVertex3d( $cx + $s * $xs, $cy,            $z );
    +    glVertex3d( $cx,            $cy + $s * $ys, $z );
    +    glVertex3d( $cx - $s * $xs, $cy,            $z );
    +    glVertex3d( $cx,            $cy - $s * $ys, $z );
    +
    +    # NEW, no parens but aligned
    +    glVertex3d $cx + $s * $xs, $cy,            $z;
    +    glVertex3d $cx,            $cy + $s * $ys, $z;
    +    glVertex3d $cx - $s * $xs, $cy,            $z;
    +    glVertex3d $cx,            $cy - $s * $ys, $z;
    +
    +    # OLD
    +    mkTextConfig $c, $x, $y, -anchor => 'se', $color;
    +    mkTextConfig $c, $x + 30, $y, -anchor => 's',  $color;
    +    mkTextConfig $c, $x + 60, $y, -anchor => 'sw', $color;
    +    mkTextConfig $c, $x, $y + 30, -anchor => 'e', $color;
    +
    +    # NEW
    +    mkTextConfig $c, $x,      $y,      -anchor => 'se', $color;
    +    mkTextConfig $c, $x + 30, $y,      -anchor => 's',  $color;
    +    mkTextConfig $c, $x + 60, $y,      -anchor => 'sw', $color;
    +    mkTextConfig $c, $x,      $y + 30, -anchor => 'e',  $color;
    +
    +    # OLD
    +    permute_test [ 'a', 'b', 'c' ],   '/', '/', [ 'a', 'b', 'c' ];
    +    permute_test [ 'a,', 'b', 'c,' ], '/', '/', [ 'a,', 'b', 'c,' ];
    +    permute_test [ 'a', ',', '#', 'c' ], '/', '/', [ 'a', ',', '#', 'c' ];
    +    permute_test [ 'f_oo', 'b_ar' ], '/', '/', [ 'f_oo', 'b_ar' ];
    +
    +    # NEW
    +    permute_test [ 'a', 'b', 'c' ],      '/', '/', [ 'a', 'b', 'c' ];
    +    permute_test [ 'a,', 'b', 'c,' ],    '/', '/', [ 'a,', 'b', 'c,' ];
    +    permute_test [ 'a', ',', '#', 'c' ], '/', '/', [ 'a', ',', '#', 'c' ];
    +    permute_test [ 'f_oo', 'b_ar' ],     '/', '/', [ 'f_oo', 'b_ar' ];
    +
    +    # OLD:
    +    is $thingy, "fee",           "source filters apply to evalbytten strings";
    +    is "foo",   $unfiltered_foo, 'filters leak not out of byte evals';
    +    is $av->[2], "NAME:my_xop",          "OP_NAME returns registered name";
    +    is $av->[3], "DESC:XOP for testing", "OP_DESC returns registered desc";
    +    is $av->[4], "CLASS:$OA_UNOP",       "OP_CLASS returns registered class";
    +    is scalar @$av, 7, "registered peep called";
    +    is $av->[5], "peep:$unop", "...with correct 'o' param";
    +    is $av->[6], "oldop:$kid", "...and correct 'oldop' param";
    +
    +    # NEW
    +    is $av->[2],    "NAME:my_xop",          "OP_NAME returns registered name";
    +    is $av->[3],    "DESC:XOP for testing", "OP_DESC returns registered desc";
    +    is $av->[4],    "CLASS:$OA_UNOP",       "OP_CLASS returns registered class";
    +    is scalar @$av, 7,                      "registered peep called";
    +    is $av->[5],    "peep:$unop",           "...with correct 'o' param";
    +    is $av->[6],    "oldop:$kid",           "...and correct 'oldop' param";
    +
    +17 Oct 2021.
    +
    +=item B
    +
    +This update keeps both of these configurations stable for all cases
    +except when the -lp option is used.  For the -lp option, both become
    +one-line blocks (the second case) to prevents the -lp indentation
    +style from being lost.  This update was made to minimize changes
    +to existing formatting.
    +
    +    $obj = {
    +        foo => sub { "bar" }
    +    };
    +
    +    $obj = { foo => sub { "bar" } };
    +
    +17 Oct 2021, f05e6b5.
    +
     =item B
     
     In some structures used in Moose coding, some asymmetrical container breaks
    diff --git a/t/snippets/align32.in b/t/snippets/align32.in
    index 7fc51fe4..204be660 100644
    --- a/t/snippets/align32.in
    +++ b/t/snippets/align32.in
    @@ -1,4 +1,15 @@
    -# should not get alignment here:
    +# align just the last two lines
     my $c_sub_khwnd = WindowFromId $k_hwnd, 0x8008;    # FID_CLIENT
     ok $c_sub_khwnd, 'have kids client window';
     ok IsWindow($c_sub_khwnd), 'IsWindow works on the client';
    +
    +# parenless calls
    +mkTextConfig $c, $x, $y, -anchor => 'se', $color;
    +mkTextConfig $c, $x + 30, $y, -anchor => 's',  $color;
    +mkTextConfig $c, $x + 60, $y, -anchor => 'sw', $color;
    +mkTextConfig $c, $x, $y + 30, -anchor => 'e', $color;
    +
    +permute_test [ 'a', 'b', 'c' ],   '/', '/', [ 'a', 'b', 'c' ];
    +permute_test [ 'a,', 'b', 'c,' ], '/', '/', [ 'a,', 'b', 'c,' ];
    +permute_test [ 'a', ',', '#', 'c' ], '/', '/', [ 'a', ',', '#', 'c' ];
    +permute_test [ 'f_oo', 'b_ar' ], '/', '/', [ 'f_oo', 'b_ar' ];
    diff --git a/t/snippets/expect/align32.def b/t/snippets/expect/align32.def
    index 7fc51fe4..5e2d791c 100644
    --- a/t/snippets/expect/align32.def
    +++ b/t/snippets/expect/align32.def
    @@ -1,4 +1,15 @@
    -# should not get alignment here:
    +# align just the last two lines
     my $c_sub_khwnd = WindowFromId $k_hwnd, 0x8008;    # FID_CLIENT
    -ok $c_sub_khwnd, 'have kids client window';
    +ok $c_sub_khwnd,           'have kids client window';
     ok IsWindow($c_sub_khwnd), 'IsWindow works on the client';
    +
    +# parenless calls
    +mkTextConfig $c, $x,      $y,      -anchor => 'se', $color;
    +mkTextConfig $c, $x + 30, $y,      -anchor => 's',  $color;
    +mkTextConfig $c, $x + 60, $y,      -anchor => 'sw', $color;
    +mkTextConfig $c, $x,      $y + 30, -anchor => 'e',  $color;
    +
    +permute_test [ 'a', 'b', 'c' ],      '/', '/', [ 'a', 'b', 'c' ];
    +permute_test [ 'a,', 'b', 'c,' ],    '/', '/', [ 'a,', 'b', 'c,' ];
    +permute_test [ 'a', ',', '#', 'c' ], '/', '/', [ 'a', ',', '#', 'c' ];
    +permute_test [ 'f_oo', 'b_ar' ],     '/', '/', [ 'f_oo', 'b_ar' ];
    diff --git a/t/snippets17.t b/t/snippets17.t
    index e726bd4d..784c5f41 100644
    --- a/t/snippets17.t
    +++ b/t/snippets17.t
    @@ -76,10 +76,21 @@ BEGIN {
         $rsources = {
     
             'align32' => <<'----------',
    -# should not get alignment here:
    +# align just the last two lines
     my $c_sub_khwnd = WindowFromId $k_hwnd, 0x8008;    # FID_CLIENT
     ok $c_sub_khwnd, 'have kids client window';
     ok IsWindow($c_sub_khwnd), 'IsWindow works on the client';
    +
    +# parenless calls
    +mkTextConfig $c, $x, $y, -anchor => 'se', $color;
    +mkTextConfig $c, $x + 30, $y, -anchor => 's',  $color;
    +mkTextConfig $c, $x + 60, $y, -anchor => 'sw', $color;
    +mkTextConfig $c, $x, $y + 30, -anchor => 'e', $color;
    +
    +permute_test [ 'a', 'b', 'c' ],   '/', '/', [ 'a', 'b', 'c' ];
    +permute_test [ 'a,', 'b', 'c,' ], '/', '/', [ 'a,', 'b', 'c,' ];
    +permute_test [ 'a', ',', '#', 'c' ], '/', '/', [ 'a', ',', '#', 'c' ];
    +permute_test [ 'f_oo', 'b_ar' ], '/', '/', [ 'f_oo', 'b_ar' ];
     ----------
     
             'bos' => <<'----------',
    @@ -314,10 +325,21 @@ sub plugh () : Ugly('\(") : Bad;
                 source => "align32",
                 params => "def",
                 expect => <<'#1...........',
    -# should not get alignment here:
    +# align just the last two lines
     my $c_sub_khwnd = WindowFromId $k_hwnd, 0x8008;    # FID_CLIENT
    -ok $c_sub_khwnd, 'have kids client window';
    +ok $c_sub_khwnd,           'have kids client window';
     ok IsWindow($c_sub_khwnd), 'IsWindow works on the client';
    +
    +# parenless calls
    +mkTextConfig $c, $x,      $y,      -anchor => 'se', $color;
    +mkTextConfig $c, $x + 30, $y,      -anchor => 's',  $color;
    +mkTextConfig $c, $x + 60, $y,      -anchor => 'sw', $color;
    +mkTextConfig $c, $x,      $y + 30, -anchor => 'e',  $color;
    +
    +permute_test [ 'a', 'b', 'c' ],      '/', '/', [ 'a', 'b', 'c' ];
    +permute_test [ 'a,', 'b', 'c,' ],    '/', '/', [ 'a,', 'b', 'c,' ];
    +permute_test [ 'a', ',', '#', 'c' ], '/', '/', [ 'a', ',', '#', 'c' ];
    +permute_test [ 'f_oo', 'b_ar' ],     '/', '/', [ 'f_oo', 'b_ar' ];
     #1...........
             },