# Perltidy Change Log
-## 2023 03 09.02
+## 2023 03 09.03
- Issue git #121. Added parameters -xbt, or --extended-block-tightness,
and -xbtl=s, or --extended-block-tightness-list=s, to allow
COPYING
docs/BugLog.html
docs/ChangeLog.html
+docs/ci_update.md
docs/eos_flag.md
docs/index.html
docs/index.md
=head1 VERSION
-This man page documents perltidy version 20230309.02
+This man page documents perltidy version 20230309.03
=head1 BUG REPORTS
sub bb {
for ( my $i =
$first,
- my $j =
- 0 ;
+ my $j = 0 ;
$i <=
$last ;
)
sub bB {
for ( my $i =
$first,
- my $j =
- 0 ;
+ my $j = 0 ;
$i <=
$last ;
)
==> b068 <==
# State 1
for ($r[0]=0,
- my $i
+ my $i
= 1
;
$i<=
for (
$r[0]
= 0,
- my $i
+ my $i
= 1
;
$i<=
"c"
]
]
- => "SubField must have two parts"
+ =>
+"SubField must have two parts"
],
);
"c"
]
]
- => "SubField must have two parts"
+ =>
+"SubField must have two parts"
],
);
my @tail =
(
@buf[ ( $i % ( -$p )
- + 1 )
+ + 1 )
.. $#buf ],
@buf[ 0 .. $i % ( -$p )
] );
# State 2
my @tail = (
@buf[ ( $i % ( -$p )
- + 1 )
+ + 1 )
.. $#buf ],
@buf[ 0 .. $i % ( -$p )
] );
[
curr_opt (
@beg[ 2,
- 5 ] ),
+ 5 ] ),
1,
@beg[ 0, 1, 3,
- 4 ] ];
+ 4 ] ];
}
==> b1090 <==
==> b1105 <==
foreach $port (
sort
- ( @ARGV[ 1 .. $#ARGV ] ) )
+ ( @ARGV[ 1 .. $#ARGV ]
+ ) )
__END__
foreach $port (
sort
my $line_number=
$self->{line_no}
->[@{$self
- ->{line_no}}
- - @{$self->{line}}
- -1];
+ ->{line_no}}-
+ @{$self->{line}}-
+ 1];
my $line_number=
$self->{line_no}
->[@{$self
- ->{line_no}}
- - @{$self->{line}}
- -1];
+ ->{line_no}}-
+ @{$self->{line}}-
+ 1];
==> b1147 <==
@summary=
==> b1148 <==
$self->{line_no}
->[ @{ $self
- ->{line_no} } -
+ ->{line_no} } -
@{ $self->{line} } -
1 ];
$self->{line_no}
->[ @{ $self
- ->{line_no} } -
+ ->{line_no} } -
@{ $self->{line} } -
1 ];
$self->{line_no}
->[ @{ $self
- ->{line_no} } -
+ ->{line_no} } -
@{ $self->{line} } -
1 ];
# S1
my $oldage
= (
- sort { $a <=> $b }
- map { -M }
- @files )[-1];
+ sort { $a <=> $b }
+ map { -M } @files )[-1];
my $depage
= (
sort { $a <=> $b }
- map { -M } @deps )
- [0];
+ map { -M } @deps )[0];
# S2
my $oldage
= (
- sort { $a <=> $b }
- map { -M }
- @files )[-1];
+ sort { $a <=> $b }
+ map { -M } @files )[-1];
my $depage
= (
sort { $a <=> $b }
- map { -M } @deps )
- [0];
+ map { -M } @deps )[0];
==> b1236 <==
# Added level test when applying kpit
for
my $index(
GZIP_MIN_HEADER_SIZE..
- GZIP_MIN_HEADER_SIZE
- + length($Name)
- -1)
+ GZIP_MIN_HEADER_SIZE
+ + length($Name)
+ -1)
__END__
for my $index(
==> b787 <==
# State 1: the +GZIP is parsed as type p
for my $index ( GZIP_MIN_HEADER_SIZE
- +1 .. GZIP_MIN_HEADER_SIZE
- -GZIP_FEXTRA_HEADER_SIZE
- +1 )
+ +1 .. GZIP_MIN_HEADER_SIZE
+ -GZIP_FEXTRA_HEADER_SIZE
+ +1 )
__END__
(
localtime(
$time
- ->as_int
- )
+ ->as_int )
)[6]
];
}
(
localtime(
$time
- ->as_int
- )
+ ->as_int )
)[6]
];
}
==> b924 <==
foreach my $p(
sort{lc($a)cmp lc($b)}
- keys%v
+ keys%v
)
__END__
# S1
foreach my $x (
sort{lc($a)cmp lc($b)}
- keys %INC
+ keys %INC
)
__END__
==> b975 <==
foreach my $x (
sort { lc($a) cmp lc($b) }
- keys %INC
+ keys %INC
)
__END__
<h1>Perltidy Change Log</h1>
-<h2>2023 03 09.02</h2>
+<h2>2023 03 09.03</h2>
-<pre><code>- Issue git #116. A new flag --valign-if-unless, -viu, was added to
+<pre><code>- Issue git #121. Added parameters -xbt, or --extended-block-tightness,
+ and -xbtl=s, or --extended-block-tightness-list=s, to allow
+ certain small code blocks to have internal spacing controlled by
+ -bbt=n instead of -bt=n. The man pages have details.
+
+- Issue git #118. A warning will be issued if a duplicate format-skipping
+ starting marker is seen within a format-skipping section. The same
+ applies to duplicate code-skipping starting markers within code-skipping
+ sections.
+
+- Issue git #116. A new flag --valign-if-unless, -viu, was added to
allow postfix 'unless' terms to align with postfix 'if' terms. The
default remains not to do this.
- Fixed git #110, add missing documentation for new options
-cpb and -bfvt=n. These work in version 20230309 but the pod
documentation was missing and has been added.
+
+- Fixed an undefined reference message when running with
+ --dump-block-summary on a file without any subs or other
+ selected block types.
+
+- Some rare, minor issues with continuation indentation have been fixed.
+ Most scripts will remain unchanged. The main change is that block
+ comments which occur just before a closing brace, bracket or paren
+ now have an indentation which is independent of the existance of
+ an optional comma or semicolon. Previously, adding or deleting
+ an optional trailing comma could cause their indentation to jump.
+ Also, indentation of comments within ternary statements has been
+ improved. For additonal information see
+
+ https://github.com/perltidy/perltidy/blob/master/docs/ci_update.md
</code></pre>
<h2>2023 03 09</h2>
<h1 id="VERSION">VERSION</h1>
-<p>This man page documents Perl::Tidy version 20230309.02</p>
+<p>This man page documents Perl::Tidy version 20230309.03</p>
<h1 id="LICENSE">LICENSE</h1>
<p>To simplify input in the case that all of the tightness flags have the same value <n>, the parameter <-act=n> or <b>--all-containers-tightness=n</b> is an abbreviation for the combination <-pt=n -sbt=n -bt=n -bbt=n>.</p>
+</dd>
+<dt id="xbt---extended-block-tightness"><b>-xbt</b>, <b>--extended-block-tightness</b></dt>
+<dd>
+
+<p>Curly braces which are considered by perltidy to contain code blocks for formatting purposes exclude some of the code blocks used by Perl mainly for isolating terms. These include curly braces following a keyword where an indirect object might occur, or curly braces following a type symbol. For example</p>
+
+<pre><code> print {*STDERR} $message;
+ return @{$self};</code></pre>
+
+<p>Since perltidy does not format these small containers as code blocks, by default the spacing within for these braces follows the flag <b>--brace-tightness=n</b>.</p>
+
+<p>But they can be made to instead follow the spacing defined by the <b>--block-brace-tightness=n</b> flag by seting <b>--extended-block-tightness</b>.</p>
+
+<p>Note that if the two flags <b>-bbt=n</b> and <b>-bt=n</b> have the same value <b>n</b> then there would be no reason to set this flag.</p>
+
+</dd>
+<dt id="xbtl-s---extended-block-tightness-list-s"><b>-xbtl=s</b>, <b>--extended-block-tightness-list=s</b></dt>
+<dd>
+
+<p>The small blocks to which the parameter <b>-xbt</b> applies consist of those curly braces preceded by the keywords</p>
+
+<pre><code> print printf sort exec system say</code></pre>
+
+<p>and special symbols</p>
+
+<pre><code> $ @ % & * $#</code></pre>
+
+<p>To restrict <b>-xbt</b> to apply to just the above keywords use</p>
+
+<pre><code> -xbtl=k</code></pre>
+
+<p>and to restrict it to apply to just the above special type symbols use</p>
+
+<pre><code> -xbtl=t</code></pre>
+
+<p>To restrict it to certain specific keywords or type symbols, enter them in the parameter <b>s</b>. For example, the following restricts it apply to just the keywords <b>print</b> and <b>say</b>:</p>
+
+<pre><code> -xbtl="print say"</code></pre>
+
+<p>Note that this parameter merely changes the way that the parameter <b>--extended-block-tightness</b> works. It has no effect unless <b>--extended-block-tightness</b> is set.</p>
+
</dd>
<dt id="tso---tight-secret-operators"><b>-tso</b>, <b>--tight-secret-operators</b></dt>
<dd>
boc bok bol bom bos bot cblx ce conv cpb
cs csc cscb cscw dac dbc dbs dcbl dcsc ddf
dln dnl dop dp dpro drc dsc dsm dsn dtc
- dtt dwic dwls dwrs dws eos f fll fpva frm
- fs fso gcs hbc hbcm hbco hbh hbhh hbi hbj
- hbk hbm hbn hbp hbpd hbpu hbq hbs hbsc hbv
- hbw hent hic hicm hico hih hihh hii hij hik
- him hin hip hipd hipu hiq his hisc hiv hiw
- hsc html ibc icb icp iob isbc iscl kgb kgbd
- kgbi kis lal log lop lp lsl mem nib ohbr
- okw ola olc oll olq opr opt osbc osbr otr
- ple pod pvl q sac sbc sbl scbb schb scp
- scsb sct se sfp sfs skp sob sobb sohb sop
- sosb sot ssc st sts t tac tbc toc tp
- tqw trp ts tsc tso vbc vc vmll vsc w
- wfc wn x xci xlp xs</code></pre>
+ dtt dwic dwls dwrs dws eos f fpva frm fs
+ fso gcs hbc hbcm hbco hbh hbhh hbi hbj hbk
+ hbm hbn hbp hbpd hbpu hbq hbs hbsc hbv hbw
+ hent hic hicm hico hih hihh hii hij hik him
+ hin hip hipd hipu hiq his hisc hiv hiw hsc
+ html ibc icb icp iob isbc iscl kgb kgbd kgbi
+ kis lal log lop lp lsl mem nib ohbr okw
+ ola olc oll olq opr opt osbc osbr otr ple
+ pod pvl q sac sbc sbl scbb schb scp scsb
+ sct se sfp sfs skp sob sobb sohb sop sosb
+ sot ssc st sts t tac tbc toc tp tqw
+ trp ts tsc tso vbc vc viu vmll vsc w
+ wfc wn x xbt xci xlp xs</code></pre>
<p>Equivalently, the prefix 'no' or 'no-' on the corresponding long names may be used.</p>
<h1 id="VERSION">VERSION</h1>
-<p>This man page documents perltidy version 20230309.02</p>
+<p>This man page documents perltidy version 20230309.03</p>
<h1 id="BUG-REPORTS">BUG REPORTS</h1>
# then the Release version must be bumped, and it is probably past time for
# a release anyway.
- $VERSION = '20230309.02';
+ $VERSION = '20230309.03';
} ## end BEGIN
sub DESTROY {
=head1 VERSION
-This man page documents Perl::Tidy version 20230309.02
+This man page documents Perl::Tidy version 20230309.03
=head1 LICENSE
use strict;
use warnings;
use English qw( -no_match_vars );
-our $VERSION = '20230309.02';
+our $VERSION = '20230309.03';
use constant EMPTY_STRING => q{};
use constant SPACE => q{ };
package Perl::Tidy::DevNull;
use strict;
use warnings;
-our $VERSION = '20230309.02';
+our $VERSION = '20230309.03';
sub new { my $self = shift; return bless {}, $self }
sub print { return }
sub close { return }
use strict;
use warnings;
use English qw( -no_match_vars );
-our $VERSION = '20230309.02';
+our $VERSION = '20230309.03';
use constant EMPTY_STRING => q{};
package Perl::Tidy::FileWriter;
use strict;
use warnings;
-our $VERSION = '20230309.02';
+our $VERSION = '20230309.03';
use constant DEVEL_MODE => 0;
use constant EMPTY_STRING => q{};
use Carp;
use English qw( -no_match_vars );
use List::Util qw( min max ); # min, max are in Perl 5.8
-our $VERSION = '20230309.02';
+our $VERSION = '20230309.03';
# The Tokenizer will be loaded with the Formatter
##use Perl::Tidy::Tokenizer; # for is_keyword()
package Perl::Tidy::HtmlWriter;
use strict;
use warnings;
-our $VERSION = '20230309.02';
+our $VERSION = '20230309.03';
use English qw( -no_match_vars );
use File::Basename;
use strict;
use warnings;
use Carp;
-our $VERSION = '20230309.02';
+our $VERSION = '20230309.03';
use constant EMPTY_STRING => q{};
use strict;
use warnings;
use Carp;
-our $VERSION = '20230309.02';
+our $VERSION = '20230309.03';
sub AUTOLOAD {
package Perl::Tidy::IndentationItem;
use strict;
use warnings;
-our $VERSION = '20230309.02';
+our $VERSION = '20230309.03';
BEGIN {
package Perl::Tidy::LineBuffer;
use strict;
use warnings;
-our $VERSION = '20230309.02';
+our $VERSION = '20230309.03';
sub AUTOLOAD {
package Perl::Tidy::LineSink;
use strict;
use warnings;
-our $VERSION = '20230309.02';
+our $VERSION = '20230309.03';
sub AUTOLOAD {
use strict;
use warnings;
use English qw( -no_match_vars );
-our $VERSION = '20230309.02';
+our $VERSION = '20230309.03';
use constant DEVEL_MODE => 0;
package Perl::Tidy::Logger;
use strict;
use warnings;
-our $VERSION = '20230309.02';
+our $VERSION = '20230309.03';
use English qw( -no_match_vars );
use constant DEVEL_MODE => 0;
use warnings;
use English qw( -no_match_vars );
-our $VERSION = '20230309.02';
+our $VERSION = '20230309.03';
use Perl::Tidy::LineBuffer;
use Carp;
use warnings;
use Carp;
use English qw( -no_match_vars );
-our $VERSION = '20230309.02';
+our $VERSION = '20230309.03';
use Perl::Tidy::VerticalAligner::Alignment;
use Perl::Tidy::VerticalAligner::Line;
{ #<<< A non-indenting brace
-our $VERSION = '20230309.02';
+our $VERSION = '20230309.03';
sub new {
my ( $class, $rarg ) = @_;
use strict;
use warnings;
use English qw( -no_match_vars );
-our $VERSION = '20230309.02';
+our $VERSION = '20230309.03';
sub AUTOLOAD {