From: Steve Hancock Date: Fri, 16 Nov 2018 16:50:12 +0000 (-0800) Subject: new version #, minor alignment updates X-Git-Tag: 20181117~5 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=dfadedfe99155e36d5fcd51ca7c6476fe27c8a45;p=perltidy.git new version #, minor alignment updates --- diff --git a/CHANGES.md b/CHANGES.md index 0a63fa20..e13c27e9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,20 +1,14 @@ # 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 @@ -39,8 +33,6 @@ - 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. @@ -56,19 +48,9 @@ - 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. @@ -92,6 +74,29 @@ 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 diff --git a/MANIFEST b/MANIFEST index 14ddbccf..18acd6ef 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,8 +1,16 @@ -_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 diff --git a/README.md b/README.md index fe007b2b..3028be44 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Welcome to Perltidy +# Welcome to Perltidy! Perltidy is a tool to indent and reformat perl scripts. It can also write scripts in html format. @@ -6,7 +6,52 @@ 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 . diff --git a/bin/perltidy b/bin/perltidy index e7cb7e39..b562145d 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -3461,7 +3461,7 @@ perlstyle(1), Perl::Tidy(3) =head1 VERSION -This man page documents perltidy version 20181116 +This man page documents perltidy version 20181117 =head1 BUG REPORTS diff --git a/dev-bin/build.pl b/dev-bin/build.pl index 69e8b0d1..440c8cbd 100755 --- a/dev-bin/build.pl +++ b/dev-bin/build.pl @@ -43,7 +43,7 @@ my $fh_log; # 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' } @@ -59,11 +59,12 @@ my $rcode = { '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"; @@ -84,10 +85,11 @@ tidy - run tidyall (tidy & critic) status: $rstatus->{'TIDY'} 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 @@ -225,14 +227,19 @@ sub make_docs { 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; } diff --git a/docs/ChangeLog.html b/docs/ChangeLog.html index d11f144e..cbeb3ea5 100644 --- a/docs/ChangeLog.html +++ b/docs/ChangeLog.html @@ -14,7 +14,7 @@