This simplifies code which gives priority to -wn over -pvt when both might apply
Also, previously a word following a '->' was given the color of a bareword,
black by default, but now it is given the color of an identifier.
- - Fixed incorrect formatting of any function named 'err'. This was
- due to some old code when use feature 'err' was valid.
+ - Fixed incorrect indentation of any function named 'err'. This was
+ due to some old code from when "use feature 'err'" was valid.
# OLD:
my ($curr) = current();
err(@_);
- Added parameter --delete-repeated-commas (-drc) to delete repeated
- commas. This is off by default. I added this option after discovering
- an unwanted repeated comma in the perltidy source. For example, given:
+ commas. This is off by default. For example, given:
ignoreSpec( $file, "file",, \%spec, \%Rspec );
This will change some existing formatting.
- The following new parameters are available for manipulating
- trailing commas. They are described in the manual.
+ trailing commas of lists. They are described in the manual.
--want-trailing-commas=s, -wtc=s
--add-trailing-commas, -atc
--paren-vertical-tightness=1
--weld-nested-containers
+==> b1424.in <==
+$registry->add_type_constraint( Moose::Meta::TypeConstraint::Parameterizable
+ ->new( $a = 1;
+ $b = 1;
+
+ ) );
+
+$registry->add_type_constraint(
+ Moose::Meta::TypeConstraint::Parameterizable
+ ->new( $a = 1;
+ $b = 1;
+
+ ) );
+
+
+==> b1424.par <==
+--extended-line-up-parentheses
+--indent-columns=8
+--keep-old-breakpoints-after='q >= - w ; <> ** & ? !='
+--stack-closing-paren
+--vertical-tightness=1
+--weld-nested-containers
+
+==> b1425.in <==
+my$sem=sub
+{
+ my$code=shift;
+ }
+ ->(sub
+ {
+ IPC::Semaphore->new(IPC_PRIVATE,$nsem,
+ S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
+ } );
+
+my$sem=sub
+{
+ my$code=shift;
+ }
+ ->(
+ sub
+ {
+ IPC::Semaphore->new(IPC_PRIVATE,$nsem,
+ S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT);
+ } );
+
+
+==> b1425.par <==
+--noadd-whitespace
+--delete-old-whitespace
+--extended-line-up-parentheses
+--ignore-old-breakpoints
+--maximum-line-length=51
+--opening-anonymous-sub-brace-on-new-line
+--paren-vertical-tightness-closing=2
+--paren-vertical-tightness=1
+--variable-maximum-line-length
+--weld-nested-containers
+
==> b146.in <==
# State 1
}
next if ($do_not_weld_rule);
- # Turn off vertical tightness completely at possible one-line welds.
- # Fixes b1402. This also fixes issues b1338, b1339, b1340, b1341,
- # b1342, b1343, but both fixes are needed in general for good
- # protection against instability. The line difference of '2'
- # worked for b1402, but needs to be '3' to include b1419 because
- # it has -vtc>0 which can add more uncertainty.
- # And for case b1421 it had to be increased to '4'.
+ # Turn off vertical tightness at possible one-line welds. Fixes
+ # b1402,b1419,b1421,b1424,b1425. This also fixes issues b1338, b1339,
+ # b1340, b1341, b1342, b1343, but both fixes are needed in general for
+ # good protection against instability. Issue c161 is the latest and
+ # simplest check, using $iline_ic==$iline_io as the test.
if ( %opening_vertical_tightness
+ && $iline_ic == $iline_io
&& $opening_vertical_tightness{$token_oo} )
{
- if ( $iline_oc - $iline_oo <= 4 ) {
- $rmax_vertical_tightness->{$outer_seqno} = 0;
- }
+ $rmax_vertical_tightness->{$outer_seqno} = 0;
}
my $is_multiline_weld =
&& $seqno_end == $rLL->[$Kc_test]->[_TYPE_SEQUENCE_]
&& $rLL->[$Kc_test]->[_LINE_INDEX_] == $iline + 1 )
{
- my $Kc_test = $rLL->[$K_terminal]->[_KNEXT_SEQ_ITEM_];
my $line_of_tokens_next = $rlines->[ $iline + 1 ];
my $rtype_count = $rtype_count_by_seqno->{$seqno_end};
my $comma_count =