# Perltidy Change Log
-## 2018 11 16
-
- - The packaging for this version has changed. The Tidy.pm file has
- been split into a smaller Tidy.pm file plus supporting modules in the path
- Perl/Tidy/*.
-
- - A number of new installation test cases have been added.
+## 2018 11 17
- Fixed RT #126965, in which a ternary operator was misparsed if immediately
following a function call without arguments, such as:
my $restrict_customer = shift ? 1 : 0;
- Fixed RT #125012: bug in -mangle --delete-all-comments
- A needed blank space bareword tokens was being removed when comments were
- deleted
+ A needed blank space before bareword tokens was being removed when comments
+ were deleted
- Fixed RT #81852: Stacked containers and quoting operators. Quoted words
(qw) delimited by container tokens ('{', '[', '(', '<') are now included in
- Fixed RT #124594, license text desc. changed from 'GPL-2.0+' to 'gpl_2'
- - RT #106493; source code repository is https://github.com/perltidy/perltidy
-
- Fixed bug in which a warning about a possible code bug was issued in a
script with brace errors.
- Fixed RT #127633, undesirable line break after return when -baao flag is set
- - Vertical alignment has been improved in several ways. Thanks especially to
- Glenn for sending helpful snippets.
-
- - In many cases, two lines which were previously left unaligned are now
- aligned.
-
- OLD:
- $expect = "1$expect" if $expect =~ /^e/i;
- $p = "1$p" if defined $p and $p =~ /^e/i;
-
- NEW:
- $expect = "1$expect" if $expect =~ /^e/i;
- $p = "1$p" if defined $p and $p =~ /^e/i;
+ - Fixed RT #127035, vertical alignment. Vertical alignment has been improved
+ in several ways. Thanks especially to Michael Wardman and Glenn for sending
+ helpful snippets.
- Alignment of the =~ operators has been reactivated.
is( pop() // 7, 0, 'pop() // ... works' );
is( pop @ARGV // 7, 3, 'pop @array // ... works' );
+ - The rules for alignment of just two lines have been adjusted,
+ hopefully to be a little better overall. In some cases, two
+ lines which were previously unaligned are now aligned, and vice-versa.
+
+ OLD:
+ $expect = "1$expect" if $expect =~ /^e/i;
+ $p = "1$p" if defined $p and $p =~ /^e/i;
+
+ NEW:
+ $expect = "1$expect" if $expect =~ /^e/i;
+ $p = "1$p" if defined $p and $p =~ /^e/i;
+
+
+ - RT #106493; source code repository location has been added to docs; it is
+ https://github.com/perltidy/perltidy
+
+ - The packaging for this version has changed. The Tidy.pm module is much
+ smaller. Supporting modules have been split out from it and placed below
+ it in the path Perl/Tidy/*.
+
+ - A number of new installation test cases have been added. Updates are now
+ continuously tested at Travis CI against versions back to Perl 5.08.
+
## 2018 02 20
- RT #124469, #124494, perltidy often making empty files. The previous had
-_config.yml
bin/perltidy
BUGS.md
CHANGES.md
COPYING
+docs/ChangeLog.html
+docs/COPYING.txt
+docs/index.html
+docs/index.md
+docs/INSTALL.html
+docs/perltidy.html
+docs/stylekey.html
+docs/Tidy.html
+docs/tutorial.html
examples/bbtidy.pl
examples/break_long_quotes.pl
examples/ex_mp.pl
-# Welcome to Perltidy
+# Welcome to Perltidy!
Perltidy is a tool to indent and reformat perl scripts. It can also
write scripts in html format.
Perltidy is free software released under the GNU General Public
License -- please see the included file "COPYING" for details.
-Documentation can be found at the web site [at GitHub](https://perltidy.github.io/perltidy/)
-or [at Sourceforge](perltidy.sourceforge.net)
+# PREREQUISITES
-A copy of the web site in contained in the docs folder of the distribution.
+`perltidy` should work with most standard Perl installations.
+The following modules are not required, but perltidy may use them if
+detected:
+
+ HTML::Entities will be used to encode HTML entities if detected
+ Pod::Html will be used to format pod text
+
+The total disk space needed after removing the installation directory will
+about 2 Mb.
+
+# DOWNLOAD
+
+There are two source distribution files:
+
+- A `.tgz` "tarball", with Unix-style <lf> line endings, and
+- A zip file, `.zip`, with Windows-style <cr><lf> line endings.
+
+In addition, the web site has links to debian and RPM packages.
+
+# INSTALLATION
+
+For most standard installations, the standard Makefile.PL method should work:
+
+ perl Makefile.PL
+ make
+ make test
+ make install
+
+The INSTALL file has additional installation notes, and tells how
+to use perltidy without doing an installation.
+
+# WHAT NEXT
+
+Please see the CHANGES file for notices of any recent updates.
+
+Please see the BUGS file for a list of all known open bugs.
+
+Documentation can be found in the `docs` directory, and it can also be
+found at http://perltidy.sourceforge.net
+
+Reading the brief tutorial should help you use perltidy effectively.
+
+# FEEDBACK / BUG REPORTS
+
+A list of current bugs and issues can be found at the CPAN site [https://rt.cpan.org/Public/Dist/Display.html?Name=Perl-Tidy](https://rt.cpan.org/Public/Dist/Display.html?Name=Perl-Tidy)
+
+To report a new bug or problem, use the link on this page .
=head1 VERSION
-This man page documents perltidy version 20181116
+This man page documents perltidy version 20181117
=head1 BUG REPORTS
# These are the main steps, in approximate order, for making a new version
# Note: Since perl critic is in the .tidyallrc, a separate 'PC' step is not
# needed
-my $rsteps = [qw( CHK V PC TIDY T CL POD DIST)];
+my $rsteps = [qw( CHK V PC TIDY T CL DOCS DIST)];
my $rstatus = {};
foreach my $step ( @{$rsteps} ) { $rstatus->{$step} = 'TBD' }
'PC' => \&run_perl_critic,
'TIDY' => \&run_tidyall,
'T' => \&make_tests,
- 'POD' => \&make_docs,
+ 'DOCS' => \&make_docs,
'DIST' => \&make_dist,
'CL' => sub {openurl($changelog)},
'LOG' => sub { openurl($logfile) },
'DIR' => sub { openurl("local-docs") },
+ 'HTML' => sub { openurl("docs/index.html") },
};
open( $fh_log, ">", $logfile ) or die "cannot open log file $logfile: $!\n";
pc - run PerlCritic (critic only) status: $rstatus->{'PC'}
t - make Tests status: $rstatus->{'T'}
cl - review/edit ChangeLog.pod status: $rstatus->{'CL'}
-pod - check and process POD docs status: $rstatus->{'POD'}
+docs - check and process POD & html status: $rstatus->{'DOCS'}
dist - make a Distribution tar.gz status: $rstatus->{'DIST'}
dir - browse doc files
log - view Log file
+html - view html files
q,x - eXit
local $" = ') (';
print "These file(s) had errors: (@errors)\n";
hitcr("See the log file");
- $rstatus->{'POD'} = 'TBD';
+ $rstatus->{'DOCS'} = 'TBD';
return;
}
# finish up
my $result = sys_command("(cd local-docs; make)");
print $result;
- $rstatus->{'POD'} = $result =~ /Stop\./i ? 'TBD' : 'OK';
+ my $status = $result =~ /Stop\./i ? 'TBD' : 'OK';
+ if ($status eq 'OK') {
+ $result = sys_command("(cd bubba; make)");
+ print $result;
+ }
+ $rstatus->{'DOCS'} = $status;
hitcr();
return;
}
<ul id="index">
<li><a href="#Perltidy-Change-Log">Perltidy Change Log</a>
<ul>
- <li><a href="#pod2018-02-20.01">2018 02 20.01</a></li>
+ <li><a href="#pod2018-11-17">2018 11 17</a></li>
<li><a href="#pod2018-02-20">2018 02 20</a></li>
<li><a href="#pod2018-02-19">2018 02 19</a></li>
<li><a href="#pod2018-01-01">2018 01 01</a></li>
<h1 id="Perltidy-Change-Log">Perltidy Change Log</h1>
-<h2 id="pod2018-02-20.01">2018 02 20.01</h2>
+<h2 id="pod2018-11-17">2018 11 17</h2>
-<pre><code> - The packaging for this version has changed. The Tidy.pm file has
- been split into a smaller Tidy.pm file plus supporting modules in the path
- Perl/Tidy/*.
-
- - Fixed RT #126965, in which a ternary operator was misparsed if immediately
+<pre><code> - Fixed RT #126965, in which a ternary operator was misparsed if immediately
following a function call without arguments, such as:
my $restrict_customer = shift ? 1 : 0;
- Fixed RT #125012: bug in -mangle --delete-all-comments
- A needed blank space bareword tokens was being removed when comments were
- deleted
+ A needed blank space before bareword tokens was being removed when comments
+ were deleted
- Fixed RT #81852: Stacked containers and quoting operators. Quoted words
(qw) delimited by container tokens ('{', '[', '(', '<') are now included in
- Fixed RT #124594, license text desc. changed from 'GPL-2.0+' to 'gpl_2'
- - RT #106493; source code repository is https://github.com/perltidy/perltidy
-
- - Numerous installation test snippets have been added.
-
- Fixed bug in which a warning about a possible code bug was issued in a
script with brace errors.
some lines was was not entabbed. This happened in code which was adjusted
for vertical alignment and in hanging side comments. Thanks to Glenn.
- - Vertical alignment has been improved in several ways. Thanks especially to
- Glenn for sending helpful snippets.
+ - Fixed RT #127633, undesirable line break after return when -baao flag is set
- - In many cases, two lines which were previously left unaligned are now
- aligned.
-
- OLD:
- $expect = "1$expect" if $expect =~ /^e/i;
- $p = "1$p" if defined $p and $p =~ /^e/i;
-
- NEW:
- $expect = "1$expect" if $expect =~ /^e/i;
- $p = "1$p" if defined $p and $p =~ /^e/i;
+ - Fixed RT #127035, vertical alignment. Vertical alignment has been improved
+ in several ways. Thanks especially to Michael Wardman and Glenn for sending
+ helpful snippets.
- Alignment of the =~ operators has been reactivated.
NEW:
is( pop // 7, 7, 'pop // ... works' );
is( pop() // 7, 0, 'pop() // ... works' );
- is( pop @ARGV // 7, 3, 'pop @array // ... works' );</code></pre>
+ is( pop @ARGV // 7, 3, 'pop @array // ... works' );
+
+ - The rules for alignment of just two lines have been adjusted,
+ hopefully to be a little better overall. In some cases, two
+ lines which were previously unaligned are now aligned, and vice-versa.
+
+ OLD:
+ $expect = "1$expect" if $expect =~ /^e/i;
+ $p = "1$p" if defined $p and $p =~ /^e/i;
+
+ NEW:
+ $expect = "1$expect" if $expect =~ /^e/i;
+ $p = "1$p" if defined $p and $p =~ /^e/i;
+
+
+ - RT #106493; source code repository location has been added to docs; it is
+ https://github.com/perltidy/perltidy
+
+ - The packaging for this version has changed. The Tidy.pm module is much
+ smaller. Supporting modules have been split out from it and placed below
+ it in the path Perl/Tidy/*.
+
+ - A number of new installation test cases have been added. Updates are now
+ continuously tested at Travis CI against versions back to Perl 5.08.</code></pre>
<h2 id="pod2018-02-20">2018 02 20</h2>
<h1 id="VERSION">VERSION</h1>
-<p>This man page documents Perl::Tidy version 20180220.01</p>
+<p>This man page documents Perl::Tidy version 20181117</p>
<h1 id="LICENSE">LICENSE</h1>
<h2>Installation</h2>
-<p>Perl::Tidy can be installed directly from CPAN one of the available methods.</p>
+<p>Perl::Tidy can be installed directly from CPAN one of the standard methods.</p>
<p>One way is to download a distribution file, unpack it and then
test and install using the Makefile.PL:</p>
make install
</code></pre>
-<p>The <a href="./INSTALL.html">INSTALL file</a> has additional installation notes, and tells how
-to use perltidy without doing an installation.</p>
+<p>The <a href="./INSTALL.html">INSTALL file</a> has additional installation notes. They
+are mainly for older sytems but also tell how to use perltidy without doing an installation.</p>
<h2>Links</h2>
<ul>
<li><a href="https://github.com/perltidy/perltidy">Perl::Tidy source code repository at GitHub</a></li>
+<li><a href="https://metacpan.org/pod/distribution/Code-TidyAll/bin/tidyall">tidyall</a> is a great tool for automatically running perltidy and other tools including perlcritic on a set of project files.</li>
<li><a href="http://sourceforge.net/projects/tidyview">Tidyview</a> is a graphical program for tweaking your .perltidyrc configuration parameters.</li>
<li><a href="https://github.com/vifo/SublimePerlTidy">A perltidy plugin for Sublime Text 2/3</a></li>
</ul>
## Installation
-Perl::Tidy can be installed directly from CPAN one of the available methods.
+Perl::Tidy can be installed directly from CPAN one of the standard methods.
One way is to download a distribution file, unpack it and then
test and install using the Makefile.PL:
make test
make install
-The [INSTALL file](./INSTALL.html) has additional installation notes, and tells how
-to use perltidy without doing an installation.
-
+The [INSTALL file](./INSTALL.html) has additional installation notes. They
+are mainly for older sytems but also tell how to use perltidy without doing an installation.
## Links
- [Perl::Tidy source code repository at GitHub](https://github.com/perltidy/perltidy)
+ - [tidyall](https://metacpan.org/pod/distribution/Code-TidyAll/bin/tidyall) is a great tool for automatically running perltidy and other tools including perlcritic on a set of project files.
- [Tidyview](http://sourceforge.net/projects/tidyview) is a graphical program for tweaking your .perltidyrc configuration parameters.
- [A perltidy plugin for Sublime Text 2/3](https://github.com/vifo/SublimePerlTidy)
<h1 id="VERSION">VERSION</h1>
-<p>This man page documents perltidy version 20180220.01</p>
+<p>This man page documents perltidy version 20181117</p>
<h1 id="BUG-REPORTS">BUG REPORTS</h1>
# Release version must be bumped, and it is probably past time for a
# release anyway.
- $VERSION = '20181116';
+ $VERSION = '20181117';
}
sub streamhandle {
}
my $get_hash_ref = sub {
- my ($key) = @_;
+ my ($key) = @_;
my $hash_ref = $input_hash{$key};
if ( defined($hash_ref) ) {
unless ( ref($hash_ref) eq 'HASH' ) {
$option_category{$opt} = $category_name[$category];
}
- $category = 11; # HTML
+ $category = 11; # HTML
$option_category{html} = $category_name[$category];
# routine to install and check options
=head1 VERSION
-This man page documents Perl::Tidy version 20181116
+This man page documents Perl::Tidy version 20181117
=head1 LICENSE
}
}
+ # Convert a bareword within braces into a quote for matching. This will
+ # allow alignment of expressions like this:
+ # local ( $SIG{'INT'} ) = IGNORE;
+ # local ( $SIG{ALRM} ) = 'POSTMAN';
+ if ( $type eq 'w'
+ && $i > $ibeg
+ && $i < $iend
+ && $types_to_go[ $i - 1 ] eq 'L'
+ && $types_to_go[ $i + 1 ] eq 'R' )
+ {
+ $type = 'Q';
+ }
+
# patch to make numbers and quotes align
if ( $type eq 'n' ) { $type = 'Q' }
# ------------------------------------------------------------
my %is_for_foreach;
- @_ = qw(for foreach);
+ @_ = qw(for foreach);
@is_for_foreach{@_} = (1) x scalar(@_);
my %is_my_our;
- @_ = qw(my our);
+ @_ = qw(my our);
@is_my_our{@_} = (1) x scalar(@_);
# These keywords may introduce blocks after parenthesized expressions,
@is_zero_continuation_block_type{@_} = (1) x scalar(@_);
my %is_not_zero_continuation_block_type;
- @_ = qw(sort grep map do eval);
+ @_ = qw(sort grep map do eval);
@is_not_zero_continuation_block_type{@_} = (1) x scalar(@_);
my %is_logical_container;
@is_logical_container{@_} = (1) x scalar(@_);
my %is_binary_type;
- @_ = qw(|| &&);
+ @_ = qw(|| &&);
@is_binary_type{@_} = (1) x scalar(@_);
my %is_binary_keyword;
- @_ = qw(and or err eq ne cmp);
+ @_ = qw(and or err eq ne cmp);
@is_binary_keyword{@_} = (1) x scalar(@_);
# 'L' is token for opening { at hash key
my %is_opening_type;
- @_ = qw< L { ( [ >;
+ @_ = qw< L { ( [ >;
@is_opening_type{@_} = (1) x scalar(@_);
# 'R' is token for closing } at hash key
my %is_closing_type;
- @_ = qw< R } ) ] >;
+ @_ = qw< R } ) ] >;
@is_closing_type{@_} = (1) x scalar(@_);
my %is_redo_last_next_goto;
- @_ = qw(redo last next goto);
+ @_ = qw(redo last next goto);
@is_redo_last_next_goto{@_} = (1) x scalar(@_);
my %is_use_require;
- @_ = qw(use require);
+ @_ = qw(use require);
@is_use_require{@_} = (1) x scalar(@_);
my %is_sub_package;
- @_ = qw(sub package);
+ @_ = qw(sub package);
@is_sub_package{@_} = (1) x scalar(@_);
# This hash holds the hash key in $tokenizer_self for these keywords:
#
# -----------------------------------------------------------------------
- my $line_of_tokens = shift;
+ my $line_of_tokens = shift;
my ($untrimmed_input_line) = $line_of_tokens->{_line_text};
# patch while coding change is underway
if ( $nested_ternary_flag[ $current_depth[$aa] - 1 ] == 0 ) {
my $pdepth = $total_depth[$aa][ $current_depth[$aa] - 1 ];
if ( $pdepth == $total_depth - 1 ) {
- $indent = 1;
+ $indent = 1;
$nested_ternary_flag[ $current_depth[$aa] - 1 ] = -1;
}
}
}
}
$nested_statement_type[$aa][ $current_depth[$aa] ] = $statement_type;
- $statement_type = "";
+ $statement_type = "";
return ( $seqno, $indent );
}
# these functions have prototypes of the form (&), so when they are
# followed by a block, that block MAY BE followed by an operator.
# Smartmatch operator ~~ may be followed by anonymous hash or array ref
- @q = qw( do eval );
+ @q = qw( do eval );
@is_block_operator{@q} = (1) x scalar(@q);
# these functions allow an identifier in the indirect object slot
- @q = qw( print printf sort exec system say);
+ @q = qw( print printf sort exec system say);
@is_indirect_object_taker{@q} = (1) x scalar(@q);
# These tokens may precede a code block
delete $really_want_term{'Y'}; # indirect object, too risky to check syntax;
# let perl do it
- @q = qw(q qq qw qx qr s y tr m);
+ @q = qw(q qq qw qx qr s y tr m);
@is_q_qq_qw_qx_qr_s_y_tr_m{@q} = (1) x scalar(@q);
# These keywords are handled specially in the tokenizer code:
my $maximum_field_index = $old_line->get_jmax();
# flush if this line has too many fields
+ # variable $GoToLoc indicates goto branch point, for debugging
my $GoToLoc = 1;
if ( $jmax > $maximum_field_index ) { goto NO_MATCH }
NO_MATCH:
+ # variable $GoToLoc is for debugging
#print "no match from $GoToLoc\n";
##print "no match jmax=$jmax max=$maximum_field_index $group_list_type lines=$maximum_line_index token=$old_rtokens->[0]\n";
my $group_list_type = $group_lines[0]->get_list_type();
- # See if these two lines have leading equals type tokens which can be
- # aligned without creating a big gap. These two below are an example that
- # have a large gap and will not be aligned:
- # local (@pieces) = split( /\./, $filename, 2 );
- # local ($just_dir_and_base) = $pieces[0];
- my $good_leading_equals;
- my $rtokens = $group_lines[0]->get_rtokens();
- if ( $rtokens->[0] =~ /=/ ) {
- my $rfields0 = $group_lines[0]->get_rfields();
- my $rfields1 = $group_lines[1]->get_rfields();
- my $len0 = length( $rfields0->[0] );
- my $len1 = length( $rfields1->[0] );
- my $gap = abs( $len0 - $len1 );
-
- # put a limit on the maximum gap we will allow here
- $good_leading_equals = ( $gap > 8 ) ? 0 : 1;
+ my $rtokens = $group_lines[0]->get_rtokens();
+ my $leading_equals = ( $rtokens->[0] =~ /=/ );
+
+ # A marginal match is a match which has different patterns. Normally, we
+ # should not allow exactly two lines to match if marginal. But we will modify
+ # this rule for two lines with a leading equals-like operator such that we
+ # match if the patterns to the left of the equals are the same. So for
+ # example the following two lines are a marginal match but have the same
+ # left side patterns, so we will align the equals.
+ # my $orig = my $format = "^<<<<< ~~\n";
+ # my $abc = "abc";
+ # But these have a different left pattern so they will not be aligned
+ # $xmldoc .= $`;
+ # $self->{'leftovers'} .= "<bx-seq:seq" . $';
+ my $is_marginal = $marginal_match;
+ if ( $leading_equals && $is_marginal ) {
+ my $rpatterns0 = $group_lines[0]->get_rpatterns();
+ my $rpatterns1 = $group_lines[1]->get_rpatterns();
+ my $pat0 = $rpatterns0->[0];
+ my $pat1 = $rpatterns1->[0];
+ $is_marginal = $pat0 ne $pat1;
}
my $do_not_align = (
&& (
- # don't align if it was marked as a 'marginal" match.
- $marginal_match
+ # don't align if it was just a marginal match
+ $is_marginal ##$marginal_match
+ # don't align two lines with big gap
+ # NOTE: I am not sure if this test is actually functional any longer
|| $group_maximum_gap > 12
- # don't align lines with differing number of alignment tokens,
- # unless the first common alignment is an equals
- || ( ( $previous_maximum_jmax_seen != $previous_minimum_jmax_seen )
- && !$good_leading_equals )
+ # or lines with differing number of alignment tokens
+ || ( $previous_maximum_jmax_seen != $previous_minimum_jmax_seen
+ && !$leading_equals )
)
);
sub new {
my ( $caller, %arg ) = @_;
my $caller_is_obj = ref($caller);
- my $class = $caller_is_obj || $caller;
+ my $class = $caller_is_obj || $caller;
##no strict "refs";
my $self = bless {}, $class;
sub new {
my ( $caller, %arg ) = @_;
my $caller_is_obj = ref($caller);
- my $class = $caller_is_obj || $caller;
+ my $class = $caller_is_obj || $caller;
##no strict "refs";
my $self = bless {}, $class;
=head1 Perltidy Change Log
-=head2 2018 11 16
+=head2 2018 11 17
- Fixed RT #126965, in which a ternary operator was misparsed if immediately
my $restrict_customer = shift ? 1 : 0;
- Fixed RT #125012: bug in -mangle --delete-all-comments
- A needed blank space bareword tokens was being removed when comments were
- deleted
+ A needed blank space before bareword tokens was being removed when comments
+ were deleted
- Fixed RT #81852: Stacked containers and quoting operators. Quoted words
(qw) delimited by container tokens ('{', '[', '(', '<') are now included in
- Fixed RT #127633, undesirable line break after return when -baao flag is set
- Fixed RT #127035, vertical alignment. Vertical alignment has been improved
- in several ways. Thanks especially to Glenn and Michael Wardman for sending
+ in several ways. Thanks especially to Michael Wardman and Glenn for sending
helpful snippets.
- - In many cases, two lines which were previously left unaligned are now
- aligned.
-
- OLD:
- $expect = "1$expect" if $expect =~ /^e/i;
- $p = "1$p" if defined $p and $p =~ /^e/i;
-
- NEW:
- $expect = "1$expect" if $expect =~ /^e/i;
- $p = "1$p" if defined $p and $p =~ /^e/i;
-
- Alignment of the =~ operators has been reactivated.
OLD:
is( pop() // 7, 0, 'pop() // ... works' );
is( pop @ARGV // 7, 3, 'pop @array // ... works' );
+ - The rules for alignment of just two lines have been adjusted,
+ hopefully to be a little better overall. In some cases, two
+ lines which were previously unaligned are now aligned, and vice-versa.
+
+ OLD:
+ $expect = "1$expect" if $expect =~ /^e/i;
+ $p = "1$p" if defined $p and $p =~ /^e/i;
+
+ NEW:
+ $expect = "1$expect" if $expect =~ /^e/i;
+ $p = "1$p" if defined $p and $p =~ /^e/i;
+
+
- RT #106493; source code repository location has been added to docs; it is
https://github.com/perltidy/perltidy
# VERSION
-This man page documents perltidy version 20181116
+This man page documents perltidy version 20181117
# BUG REPORTS
- Go up to the git root directory and run 'make test' to verify that all
snippets are still working correctly
+
+## What to do if a test script fails
+
+If one of the test scripts fails it could be due to a bug which has been introduced
+or it could be a desirable formatting change introduced by a recent update. In either
+case just run 'make' and look at the differences. The script will give the
+names of the cases with differences. For example, if case 'align6.def' failed
+then the old expected result is 'expect/align6.def' and the new result is 'tmp/align6.def'.
+These files are the result of running perltidy on 'align6.def' with default parameters
+('def.par'). After investigating and fixing any problems with the code,
+run 'make' again, and if all is well run the script it writes 'RUNME.sh'
+to create new snippets if necessary.
+
## How to clean up a .par file
The '.par' parameter files are just .perltidyrc files, and they can be quite