# Perltidy Change Log
-## 2020 09 07.01
+## 2020 10 01
+
+ - Robustness of perltidy has been significantly improved. Updating is recommended. Continual
+ automated testing runs began about 1 Sep 2020 and numerous issues have been found and fixed.
+ Many involve references to uninitialized variables when perltidy is fed random text and random
+ control parameters. A complete list is given in the file
+
+ https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod
- Added the token '->' to the list of alignment tokens, as suggested in git
#39, so that it can be vertically aligned if a space is placed before them with -wls='->'.
- Added keyword 'isa'.
- - Numerous issues have been found during automated testing and fixed. Many involve references to
- uninitialized variables when perltidy is given random text. A complete list is given in
- the file
-
- https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod
-
## 2020 09 07
- Fixed bug git #37, an error when the combination -scbb -csc was used.
BUGS.md
CHANGES.md
COPYING
+docs/BugLog.html
docs/ChangeLog.html
docs/index.html
docs/index.md
t/snippets2.t
t/snippets20.t
t/snippets21.t
+t/snippets22.t
t/snippets3.t
t/snippets4.t
t/snippets5.t
=head1 VERSION
-This man page documents perltidy version 20200907.01
+This man page documents perltidy version 20201001
=head1 BUG REPORTS
<dl>
+<dt id="Keep-any-space-between-a-bareword-and-quote"><b>Keep any space between a bareword and quote</b></dt>
+<dd>
+
+<p>In random testing, the -mangle option introduced a syntax error by deleting the space between barewords and quotes (test file 'MxScreen'), such as:</p>
+
+<pre><code> oops"Your login, $Bad_Login, is not valid";</code></pre>
+
+<p>Sub 'is_essential_whitespace' was updated to prevent this on 27 Sep 2020, in 'keep any space between a bareword and quote', f32553c.</p>
+
+</dd>
+<dt id="Fixed-some-incorrect-indentation-disagreements-reported-in-LOG-file"><b>Fixed some incorrect indentation disagreements reported in LOG file</b></dt>
+<dd>
+
+<p>The .LOG file reports any disagreements between the indentation of the input and output files. This can help locate brace errors. These were incorrect when some of the options were used, including --whitespace-cycle, -bbhb, -nib. This was corrected 24 Sep 2020, 'fixed incorrect log entry for indentation disagreement', 3d40545. At the same time, locations of closing brace indentation disagreements are now tracked and reported in the .ERR file when there is a brace error. This can help localize the error if the file was previously formatted by perltidy.</p>
+
+</dd>
<dt id="If-an-cut-starts-a-POD-section-within-code-give-a-warning"><b>If an =cut starts a POD section within code, give a warning</b></dt>
<dd>
<dt id="Switched-from-using-an-eval-block-to-the--can-function-for-sub-finish_formatting"><b>Switched from using an eval block to the -</b>can() function for sub finish_formatting></dt>
<dd>
-<p>This is not a bug, but is cleaner coding and insures that error messages get reported. This change was made 20 Sep 2020.</p>
+<p>This is not a bug, but is cleaner coding and insures that error messages get reported. This change was made 20 Sep 2020, 'switch from eval { } to ->can('finish_formatting')', 28f2a4f.</p>
</dd>
<dt id="fixed-uninitialized-value-reference"><b>fixed uninitialized value reference</b></dt>
<dd>
-<p>The following message was generated during automated testing Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12079. Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12089. Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12097.</p>
+<p>The following message was generated during automated testing</p>
+
+<pre><code> Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12079.
+ Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12089.
+ Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12097.</code></pre>
<p>The problem could be simplified to running perltidy -wn on this snippet:</p>
<h1>Perltidy Change Log</h1>
-<h2>2020 09 07.01</h2>
+<h2>2020 10 01</h2>
-<pre><code>- Added the token '->' to the list of alignment tokens, as suggested in git
+<pre><code>- Robustness of perltidy has been significantly improved. Updating is recommended. Continual
+ automated testing runs began about 1 Sep 2020 and numerous issues have been found and fixed.
+ Many involve references to uninitialized variables when perltidy is fed random text and random
+ control parameters. A complete list is given in the file
+
+ https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod
+
+- Added the token '->' to the list of alignment tokens, as suggested in git
#39, so that it can be vertically aligned if a space is placed before them with -wls='->'.
- Added parameters -bbhb=n (--break-before-hash-brace=n), -bbsb=n (--break-before-square-bracket=n),
control indentation of these tokens.
- Added keyword 'isa'.
-
-- Numerous issues have been found during automated testing and fixed. Many involve references to
- uninitialized variables when perltidy is given random text. A complete list is given in
- the file
-
- https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod
</code></pre>
<h2>2020 09 07</h2>
<h1 id="VERSION">VERSION</h1>
-<p>This man page documents Perl::Tidy version 20200907.01</p>
+<p>This man page documents Perl::Tidy version 20201001</p>
<h1 id="LICENSE">LICENSE</h1>
<h1 id="VERSION">VERSION</h1>
-<p>This man page documents perltidy version 20200907.01</p>
+<p>This man page documents perltidy version 20201001</p>
<h1 id="BUG-REPORTS">BUG REPORTS</h1>
# Release version must be bumped, and it is probably past time for a
# release anyway.
- $VERSION = '20200907.01';
+ $VERSION = '20201001';
}
sub DESTROY {
=head1 VERSION
-This man page documents Perl::Tidy version 20200907.01
+This man page documents Perl::Tidy version 20201001
=head1 LICENSE
package Perl::Tidy::Debugger;
use strict;
use warnings;
-our $VERSION = '20200907.01';
+our $VERSION = '20201001';
sub new {
package Perl::Tidy::DevNull;
use strict;
use warnings;
-our $VERSION = '20200907.01';
+our $VERSION = '20201001';
sub new { my $self = shift; return bless {}, $self }
sub print { return }
sub close { return }
package Perl::Tidy::Diagnostics;
use strict;
use warnings;
-our $VERSION = '20200907.01';
+our $VERSION = '20201001';
sub AUTOLOAD {
}
sub DESTROY {
+
# required to avoid call to AUTOLOAD in some versions of perl
}
package Perl::Tidy::FileWriter;
use strict;
use warnings;
-our $VERSION = '20200907.01';
+our $VERSION = '20201001';
sub AUTOLOAD {
}
sub DESTROY {
+
# required to avoid call to AUTOLOAD in some versions of perl
}
{ #<<< A non-indenting brace to contain all lexical variables
use Carp;
-our $VERSION = '20200907.01';
+our $VERSION = '20201001';
# The Tokenizer will be loaded with the Formatter
##use Perl::Tidy::Tokenizer; # for is_keyword()
# $forced_breakpoint_to_go[$i]
# may be updated to be =1 for any index $i after which there must be
# a break. This signals later routines not to undo the breakpoint.
- use constant DEBUG_BREAKPOINTS => 0;
my ( $self, $saw_good_break ) = @_;
+ use constant DEBUG_BREAKPOINTS => 0;
+
my @i_first = (); # the first index to output
my @i_last = (); # the last index to output
my @i_colon_breaks = (); # needed to decide if we have to break at ?'s
package Perl::Tidy::HtmlWriter;
use strict;
use warnings;
-our $VERSION = '20200907.01';
+our $VERSION = '20201001';
use File::Basename;
# some diagnostic information. This sub should never be called
# except for a programming error.
our $AUTOLOAD;
- return if ($AUTOLOAD eq 'DESTROY');
+ return if ( $AUTOLOAD eq 'DESTROY' );
my ( $pkg, $fname, $lno ) = caller();
print STDERR <<EOM;
======================================================================
}
sub DESTROY {
+
# required to avoid call to AUTOLOAD in some versions of perl
}
use strict;
use warnings;
use Carp;
-our $VERSION = '20200907.01';
+our $VERSION = '20201001';
sub AUTOLOAD {
}
sub DESTROY {
+
# required to avoid call to AUTOLOAD in some versions of perl
}
use strict;
use warnings;
use Carp;
-our $VERSION = '20200907.01';
+our $VERSION = '20201001';
sub AUTOLOAD {
}
sub DESTROY {
+
# required to avoid call to AUTOLOAD in some versions of perl
}
package Perl::Tidy::IndentationItem;
use strict;
use warnings;
-our $VERSION = '20200907.01';
+our $VERSION = '20201001';
BEGIN {
}
sub DESTROY {
+
# required to avoid call to AUTOLOAD in some versions of perl
}
package Perl::Tidy::LineBuffer;
use strict;
use warnings;
-our $VERSION = '20200907.01';
+our $VERSION = '20201001';
sub AUTOLOAD {
}
sub DESTROY {
+
# required to avoid call to AUTOLOAD in some versions of perl
}
package Perl::Tidy::LineSink;
use strict;
use warnings;
-our $VERSION = '20200907.01';
+our $VERSION = '20201001';
sub AUTOLOAD {
}
sub DESTROY {
+
# required to avoid call to AUTOLOAD in some versions of perl
}
package Perl::Tidy::LineSource;
use strict;
use warnings;
-our $VERSION = '20200907.01';
+our $VERSION = '20201001';
sub AUTOLOAD {
}
sub DESTROY {
+
# required to avoid call to AUTOLOAD in some versions of perl
}
package Perl::Tidy::Logger;
use strict;
use warnings;
-our $VERSION = '20200907.01';
+our $VERSION = '20201001';
sub AUTOLOAD {
}
sub DESTROY {
+
# required to avoid call to AUTOLOAD in some versions of perl
}
package Perl::Tidy::Tokenizer;
use strict;
use warnings;
-our $VERSION = '20200907.01';
+our $VERSION = '20201001';
use Perl::Tidy::LineBuffer;
use Carp;
package Perl::Tidy::VerticalAligner;
use strict;
use warnings;
-our $VERSION = '20200907.01';
+our $VERSION = '20201001';
use Perl::Tidy::VerticalAligner::Alignment;
use Perl::Tidy::VerticalAligner::Line;
package Perl::Tidy::VerticalAligner::Alignment;
use strict;
use warnings;
-our $VERSION = '20200907.01';
+our $VERSION = '20201001';
{
}
sub AUTOLOAD {
-
+
# Catch any undefined sub calls so that we are sure to get
# some diagnostic information. This sub should never be called
# except for a programming error.
package Perl::Tidy::VerticalAligner::Line;
use strict;
use warnings;
-our $VERSION = '20200907.01';
+our $VERSION = '20201001';
{
}
sub AUTOLOAD {
-
+
# Catch any undefined sub calls so that we are sure to get
# some diagnostic information. This sub should never be called
# except for a programming error.
our $AUTOLOAD;
- return if ($AUTOLOAD eq 'DESTROY');
+ return if ( $AUTOLOAD eq 'DESTROY' );
my ( $pkg, $fname, $lno ) = caller();
print STDERR <<EOM;
======================================================================
oops"Your login, $Bad_Login, is not valid";
-Sub is_essential_whitespace was updated to prevent this on 27 Sep 2020.
+Sub 'is_essential_whitespace' was updated to prevent this on 27 Sep 2020,
+in 'keep any space between a bareword and quote', f32553c.
=item B<Fixed some incorrect indentation disagreements reported in LOG file>
=item B<Switched from using an eval block to the ->can() function for sub finish_formatting>
This is not a bug, but is cleaner coding and insures that error messages get reported.
-This change was made 20 Sep 2020.
+This change was made 20 Sep 2020, 'switch from eval { } to ->can('finish_formatting')', 28f2a4f.
=item B<fixed uninitialized value reference>
- review tickets at [rt.cpan.org](https://rt.cpan.org/Public/Dist/Display.html?Name=Perl-Tidy)
- review the issues at [github](https://github.com/perltidy/perltidy/issues/)
- compare the new version with previous version on all files in test area
+- run random testing on final version for a significant time before releasing (several days)
- run 'author tests' on a much larger body of code than is covered by the .t
files.
- compare results of the current version with previous version