# Perltidy Change Log
+## 2023 03 09.01
+
+ - Fixed git #115. In the two most recent CPAN releases, when the
+ Perl::Tidy module was called with the source pointing to a file,
+ but no destination specified, the output went to the standard
+ output instead of to a file with extension ``.tdy``, as it should
+ have. This has been fixed.
+
+ - 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.
+
## 2023 03 09
- No significant bugs have been found since the last release to CPAN.
=head1 VERSION
-This man page documents perltidy version 20230309
+This man page documents perltidy version 20230309.01
=head1 BUG REPORTS
<h1>Perltidy Change Log</h1>
+<h2>2023 03 09.01</h2>
+
+<pre><code>- Fixed git #115. In the two most recent CPAN releases, when the
+ Perl::Tidy module was called with the source pointing to a file,
+ but no destination specified, the output went to the standard
+ output instead of to a file with extension ``.tdy``, as it should
+ have. This has been fixed.
+
+- 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.
+</code></pre>
+
<h2>2023 03 09</h2>
<pre><code>- No significant bugs have been found since the last release to CPAN.
<p>Parameters which control formatting may be passed in several ways: in a <i>.perltidyrc</i> configuration file, in the <b>perltidyrc</b> parameter, and in the <b>argv</b> parameter.</p>
-<p>The <b>-syn</b> (<b>--check-syntax</b>) flag may be used with all source and destination streams except for standard input and output. However data streams which are not associated with a filename will be copied to a temporary file before being passed to Perl. This use of temporary files can cause somewhat confusing output from Perl.</p>
-
<p>If the <b>-pbp</b> style is used it will typically be necessary to also specify a <b>-nst</b> flag. This is necessary to turn off the <b>-st</b> flag contained in the <b>-pbp</b> parameter set which otherwise would direct the output stream to the standard output.</p>
<h1 id="EXAMPLES">EXAMPLES</h1>
<h1 id="VERSION">VERSION</h1>
-<p>This man page documents Perl::Tidy version 20230309</p>
+<p>This man page documents Perl::Tidy version 20230309.01</p>
<h1 id="LICENSE">LICENSE</h1>
<p>A conflict occurs if both <b>-bl</b> and <b>-bar</b> are specified.</p>
+</dd>
+<dt id="cpb---cuddled-paren-brace"><b>-cpb</b>, <b>--cuddled-paren-brace</b></dt>
+<dd>
+
+<p>A related parameter, <b>--cuddled-paren-brace</b>, causes perltidy to join two lines which otherwise would be</p>
+
+<pre><code> )
+ {</code></pre>
+
+<p>to be</p>
+
+<pre><code> ) {</code></pre>
+
+<p>For example:</p>
+
+<pre><code> # default
+ foreach my $dir (
+ '05_lexer', '07_token', '08_regression', '11_util',
+ '13_data', '15_transform'
+ )
+ {
+ ...
+ }
+
+ # perltidy -cpb
+ foreach my $dir (
+ '05_lexer', '07_token', '08_regression', '11_util',
+ '13_data', '15_transform'
+ ) {
+ ...;
+ }</code></pre>
+
</dd>
<dt id="otr---opening-token-right-and-related-flags"><b>-otr</b>, <b>--opening-token-right</b> and related flags</dt>
<dd>
-bbpi=1 outdent by one continuation level
-bbpi=2 indent one full indentation level</code></pre>
+</dd>
+<dt id="bfvt-n---brace-follower-vertical-tightness-n"><b>-bfvt=n</b>, <b>--brace-follower-vertical-tightness=n</b></dt>
+<dd>
+
+<p>Some types of closing block braces, such as <b>eval</b>, may be followed by additional code. A line break may be inserted between such a closing brace and the following code depending on the parameter <b>n</b> and the length of the trailing code, as follows:</p>
+
+<p>If the trailing code fits on a single line, then</p>
+
+<pre><code> -bfvt=0 Follow the input style regarding break/no-break
+ -bfvt=1 Follow the input style regarding break/no-break [Default]
+ -bfvt=2 Do not insert a line break</code></pre>
+
+<p>If the trailing code requires multiple lines, then</p>
+
+<pre><code> -bfvt=0 Insert a line break
+ -bfvt=1 Insert a line break except for a cuddled block chain [Default]
+ -bfvt=2 Do not insert a line break</code></pre>
+
+<p>So the most compact code is achieved with <b>-bfvt=2</b>.</p>
+
+<p>Example (non-cuddled, multiple lines ):</p>
+
+<pre><code> # -bfvt=0 or -bvft=1 [DEFAULT]
+ eval {
+ ( $line, $cond ) = $self->_normalize_if_elif($line);
+ 1;
+ }
+ or die sprintf "Error at line %d\nLine %d: %s\n%s",
+ ( $line_info->start_line_num() ) x 2, $line, $@;
+
+ # -bfvt=2
+ eval {
+ ( $line, $cond ) = $self->_normalize_if_elif($line);
+ 1;
+ } or die sprintf "Error at line %d\nLine %d: %s\n%s",
+ ( $line_info->start_line_num() ) x 2, $line, $@;</code></pre>
+
+<p>Example (cuddled, multiple lines):</p>
+
+<pre><code> # -bfvt=0
+ eval {
+ #STUFF;
+ 1; # return true
+ }
+ or do {
+ ##handle error
+ };
+
+ # -bfvt=1 [DEFAULT] or -bfvt=2
+ eval {
+ #STUFF;
+ 1; # return true
+ } or do {
+ ##handle error
+ };</code></pre>
+
</dd>
</dl>
<h1 id="VERSION">VERSION</h1>
-<p>This man page documents perltidy version 20230309</p>
+<p>This man page documents perltidy version 20230309.01</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';
+ $VERSION = '20230309.01';
} ## end BEGIN
sub DESTROY {
=head1 VERSION
-This man page documents Perl::Tidy version 20230309
+This man page documents Perl::Tidy version 20230309.01
=head1 LICENSE
use strict;
use warnings;
use English qw( -no_match_vars );
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
use constant EMPTY_STRING => q{};
use constant SPACE => q{ };
package Perl::Tidy::DevNull;
use strict;
use warnings;
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
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';
+our $VERSION = '20230309.01';
use constant EMPTY_STRING => q{};
package Perl::Tidy::FileWriter;
use strict;
use warnings;
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
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';
+our $VERSION = '20230309.01';
# 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';
+our $VERSION = '20230309.01';
use English qw( -no_match_vars );
use File::Basename;
use strict;
use warnings;
use Carp;
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
use constant EMPTY_STRING => q{};
use strict;
use warnings;
use Carp;
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
sub AUTOLOAD {
package Perl::Tidy::IndentationItem;
use strict;
use warnings;
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
BEGIN {
package Perl::Tidy::LineBuffer;
use strict;
use warnings;
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
sub AUTOLOAD {
package Perl::Tidy::LineSink;
use strict;
use warnings;
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
sub AUTOLOAD {
use strict;
use warnings;
use English qw( -no_match_vars );
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
use constant DEVEL_MODE => 0;
package Perl::Tidy::Logger;
use strict;
use warnings;
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
use English qw( -no_match_vars );
use constant DEVEL_MODE => 0;
use warnings;
use English qw( -no_match_vars );
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
use Perl::Tidy::LineBuffer;
use Carp;
use warnings;
use Carp;
use English qw( -no_match_vars );
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
use Perl::Tidy::VerticalAligner::Alignment;
use Perl::Tidy::VerticalAligner::Line;
{ #<<< A non-indenting brace
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
sub new {
my ( $class, $rarg ) = @_;
use strict;
use warnings;
use English qw( -no_match_vars );
-our $VERSION = '20230309';
+our $VERSION = '20230309.01';
sub AUTOLOAD {