From 689bb354b518b3707c39eff7ce43e47bd2ea732d Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Thu, 2 Jan 2025 11:30:34 -0800 Subject: [PATCH] update version for next cpan release --- CHANGES.md | 8 +- bin/perltidy | 4 +- dev-bin/build.pl | 103 +++++++++++++++------ docs/ChangeLog.html | 14 ++- docs/Tidy.html | 2 +- docs/perltidy.html | 4 +- lib/Perl/Tidy.pm | 6 +- lib/Perl/Tidy.pod | 2 +- lib/Perl/Tidy/Debugger.pm | 2 +- lib/Perl/Tidy/Diagnostics.pm | 2 +- lib/Perl/Tidy/FileWriter.pm | 2 +- lib/Perl/Tidy/Formatter.pm | 4 +- lib/Perl/Tidy/HtmlWriter.pm | 2 +- lib/Perl/Tidy/IOScalar.pm | 2 +- lib/Perl/Tidy/IOScalarArray.pm | 2 +- lib/Perl/Tidy/IndentationItem.pm | 2 +- lib/Perl/Tidy/Logger.pm | 2 +- lib/Perl/Tidy/Tokenizer.pm | 2 +- lib/Perl/Tidy/VerticalAligner.pm | 2 +- lib/Perl/Tidy/VerticalAligner/Alignment.pm | 2 +- lib/Perl/Tidy/VerticalAligner/Line.pm | 2 +- local-docs/Release-Checklist.md | 1 - 22 files changed, 113 insertions(+), 59 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index f6945cbf..a87db287 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,6 @@ # Perltidy Change Log -## 2024 09 03.09 +## 2025 01 05 - If a file consists only of comments, then the starting indentation will be guessed from the indentation of the first comment. Previously it would @@ -18,7 +18,7 @@ perltidy -duk File.pm >output.txt - The purpose is to help locate misspelled hash keys. + This can help locate misspelled hash keys. - Line breaks at long chains of method calls now break at all calls with args in parens, as in this example from git #171 @@ -39,8 +39,8 @@ ->catch( sub { warn shift } ); } - - An update for parameter --break-at-old-method-breakpoints, or -bom, - has been made to insure that it only applies to lines beginning with + - Parameter --break-at-old-method-breakpoints, or -bom, has been + updated to insure that it only applies to lines beginning with method calls, as intended. Line breaks for all lines beginning with '->', even non-method calls, can be retained by using --keep-old-breakpoints_before='->'. diff --git a/bin/perltidy b/bin/perltidy index 27be6d38..9c67dc30 100644 --- a/bin/perltidy +++ b/bin/perltidy @@ -7342,7 +7342,7 @@ The perltidy binary uses the Perl::Tidy module and is installed when that module =head1 VERSION -This man page documents perltidy version 20240903.09 +This man page documents perltidy version 20250105 =head1 BUG REPORTS @@ -7352,7 +7352,7 @@ To report a new bug or problem, use the "issues" link on this page. =head1 COPYRIGHT -Copyright (c) 2000-2024 by Steve Hancock +Copyright (c) 2000-2025 by Steve Hancock =head1 LICENSE diff --git a/dev-bin/build.pl b/dev-bin/build.pl index 51baead0..3c191eb6 100755 --- a/dev-bin/build.pl +++ b/dev-bin/build.pl @@ -44,6 +44,7 @@ chdir $git_home; my $logfile = "dev-bin/build.log"; my $changelog = "CHANGES.md"; my $fh_log; +my $source_VERSION = $Perl::Tidy::VERSION; # 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 @@ -83,7 +84,6 @@ $fh_log->close(); sub main { while (1) { -##A - run All Steps... print <{'V'} = $ok ? 'OK' : 'TBD'; @@ -601,8 +600,8 @@ EOM return; } elsif ( $ans eq 'RV' ) { - my $new_VERSION = get_new_release_version($reported_VERSION); - next if ( $new_VERSION == $reported_VERSION ); + my $new_VERSION = get_new_release_version(); + next if ( $new_VERSION == $source_VERSION ); if ( ifyes("New version will be: '$new_VERSION'. OK? [Y/N]") ) { my $ok = update_all_sources( $new_VERSION, @sources ); $rstatus->{'V'} = $ok ? 'OK' : 'TBD'; @@ -610,7 +609,7 @@ EOM return; } elsif ( $ans eq 'CA' ) { - my $new_VERSION = $reported_VERSION; + my $new_VERSION = $source_VERSION; my $ok = update_all_sources( $new_VERSION, @sources ); $rstatus->{'V'} = $ok ? 'OK' : 'TBD'; return; @@ -619,7 +618,7 @@ EOM # I have left this as a hidden menu item for testing # but it is not on the menu because it would be confusing elsif ( $ans eq 'CS' ) { - my $new_VERSION = $reported_VERSION; + my $new_VERSION = $source_VERSION; my @check = grep { ifyes("Check $_? [Y/N]") } @sources; update_all_sources( $new_VERSION, @check ); return; @@ -635,9 +634,8 @@ EOM } ## end sub update_version_number sub get_new_development_version { - my ($reported_VERSION) = @_; - my $new_VERSION = $reported_VERSION; - my @parts = split /\./, $reported_VERSION; + my $new_VERSION = $source_VERSION; + my @parts = split /\./, $source_VERSION; if ( @parts == 1 ) { # first development after release @@ -669,8 +667,7 @@ sub get_new_development_version { } ## end sub get_new_development_version sub get_new_release_version { - my ($reported_VERSION) = @_; - my $new_VERSION = $reported_VERSION; + my $new_VERSION = $source_VERSION; my ( $day, $month, $year ) = (localtime)[ 3, 4, 5 ]; $year += 1900; $month += 1; @@ -691,10 +688,9 @@ sub update_copyright_date { # lib/Perl/Tidy.pm: 2 places $rstatus->{'YEAR'} = 'TBD'; - my $reported_VERSION = $Perl::Tidy::VERSION; - my $reported_year = substr( $reported_VERSION, 0, 4 ); + my $reported_year = substr( $source_VERSION, 0, 4 ); if ( !$reported_year || $reported_year !~ /\d\d\d\d/ ) { - query("Cannot find reported year in $reported_VERSION\n"); + query("Cannot find reported year in $source_VERSION\n"); return; } @@ -737,7 +733,8 @@ EOM } } else { - print "Copyright years are up to date in $source_file\n"; + print +"Copyright year and version year are '$reported_year' in $source_file\n"; $rstatus->{'YEAR'} = 'OK'; } } @@ -1055,6 +1052,10 @@ To avoid error, I put this last command in a script $runme EOM hitcr(); } + + # Keep track of the current source version since it differs from the + # running version. + $source_VERSION = $new_VERSION; return 1; } ## end sub update_all_sources @@ -1066,6 +1067,9 @@ sub scan_for_pod { # confusing. Any pod markers left in a .pm file are probably leftovers # from debugging and need to be removed. + # And they should not contain __END__ or __DATA__ sections. The reason + # is that this would cause the pm2pl script to fail. + my ($rsources) = @_; my (@sources) = @{$rsources}; @@ -1091,20 +1095,47 @@ EOM } my @files_with_pod; + my @files_with_END; + my @files_with_DATA; + my @files_with_FIXME; while ( my $source_file = shift @sources ) { next unless ( $source_file =~ /\.pm$/ ); my $result = qx/grep "^=cut" $source_file/; if ($result) { push @files_with_pod, $source_file; } + $result = qx/grep "^__END__" $source_file/; + if ($result) { + push @files_with_END, $source_file; + } + $result = qx/grep "^__DATA__" $source_file/; + if ($result) { + push @files_with_DATA, $source_file; + } + $result = qx/grep "FIXME" $source_file/; + if ($result) { + push @files_with_FIXME, $source_file; + } } ## end while ( my $source_file =...) - my $saw_pod = @files_with_pod; + my $saw_pod = @files_with_pod; + my $saw_END = @files_with_END; + my $saw_DATA = @files_with_DATA; + my $saw_FIXME = @files_with_FIXME; + my $saw_problem = $saw_pod || $saw_END || $saw_DATA; + + if ($saw_FIXME) { + local $" = ') ('; + query(< to continue +EOM + } + print < to continue. ------------------------------------------------------------------- EOM } - else { + if ($saw_END) { + local $" = ') ('; + query(< to continue. +------------------------------------------------------------------- +EOM + } + if ($saw_DATA) { + local $" = ') ('; + query(< to continue. +------------------------------------------------------------------- +EOM + } + if ( !$saw_problem ) { print <Perltidy Change Log -

2024 09 03.09

+

2025 01 05

-
- Added missing 'use File::Temp' for -html option. This was causing the
+
- If a file consists only of comments, then the starting indentation will
+  be guessed from the indentation of the first comment. Previously it would
+  be guessed to be zero. Parameter --starting-indentation-level=n can be
+  used to specify an indentation and avoid a guess. This issue can
+  arise when formatting a block of comments from within an editor.
+
+- Added missing 'use File::Temp' for -html option. This was causing the
   message: "Undefined subroutine &File::Temp::tempfile called at ..."
   See git #176.
 
@@ -33,8 +39,8 @@
           ->catch( sub { warn shift } );
     }
 
-- An update for parameter --break-at-old-method-breakpoints, or -bom,
-has been made to insure that it only applies to lines beginning with
+- Parameter --break-at-old-method-breakpoints, or -bom, has been
+updated to insure that it only applies to lines beginning with
 method calls, as intended.  Line breaks for all lines beginning with
 '->', even non-method calls, can be retained by using
 --keep-old-breakpoints_before='->'.
diff --git a/docs/Tidy.html b/docs/Tidy.html
index a725af1d..878ab203 100644
--- a/docs/Tidy.html
+++ b/docs/Tidy.html
@@ -399,7 +399,7 @@
 
 

VERSION

-

This man page documents Perl::Tidy version 20240903.09

+

This man page documents Perl::Tidy version 20250105

LICENSE

diff --git a/docs/perltidy.html b/docs/perltidy.html index 7992fd46..a0150f42 100644 --- a/docs/perltidy.html +++ b/docs/perltidy.html @@ -5700,7 +5700,7 @@

VERSION

-

This man page documents perltidy version 20240903.09

+

This man page documents perltidy version 20250105

BUG REPORTS

@@ -5710,7 +5710,7 @@

COPYRIGHT

-

Copyright (c) 2000-2024 by Steve Hancock

+

Copyright (c) 2000-2025 by Steve Hancock

LICENSE

diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index b656cd3c..b74396c8 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -3,7 +3,7 @@ # # perltidy - a perl script indenter and formatter # -# Copyright (c) 2000-2024 by Steve Hancock +# Copyright (c) 2000-2025 by Steve Hancock # Distributed under the GPL license agreement; see file COPYING # # This program is free software; you can redistribute it and/or modify @@ -136,7 +136,7 @@ BEGIN { # then the Release version must be bumped, and it is probably past time for # a release anyway. - $VERSION = '20240903.09'; + $VERSION = '20250105'; } ## end BEGIN sub DESTROY { @@ -6178,7 +6178,7 @@ sub show_version { print {*STDOUT} <<"EOM"; This is perltidy, v$VERSION -Copyright 2000-2024 by Steve Hancock +Copyright 2000-2025 by Steve Hancock Perltidy is free software and may be copied under the terms of the GNU General Public License, which is included in the distribution files. diff --git a/lib/Perl/Tidy.pod b/lib/Perl/Tidy.pod index 9cf056db..3e9ddb02 100644 --- a/lib/Perl/Tidy.pod +++ b/lib/Perl/Tidy.pod @@ -469,7 +469,7 @@ The module 'Perl::Tidy' comes with a binary 'perltidy' which is installed when t =head1 VERSION -This man page documents Perl::Tidy version 20240903.09 +This man page documents Perl::Tidy version 20250105 =head1 LICENSE diff --git a/lib/Perl/Tidy/Debugger.pm b/lib/Perl/Tidy/Debugger.pm index ceaca3ff..3f850ef6 100644 --- a/lib/Perl/Tidy/Debugger.pm +++ b/lib/Perl/Tidy/Debugger.pm @@ -8,7 +8,7 @@ package Perl::Tidy::Debugger; use strict; use warnings; use English qw( -no_match_vars ); -our $VERSION = '20240903.09'; +our $VERSION = '20250105'; use constant EMPTY_STRING => q{}; use constant SPACE => q{ }; diff --git a/lib/Perl/Tidy/Diagnostics.pm b/lib/Perl/Tidy/Diagnostics.pm index 1a3775f8..567e362b 100644 --- a/lib/Perl/Tidy/Diagnostics.pm +++ b/lib/Perl/Tidy/Diagnostics.pm @@ -18,7 +18,7 @@ package Perl::Tidy::Diagnostics; use strict; use warnings; use English qw( -no_match_vars ); -our $VERSION = '20240903.09'; +our $VERSION = '20250105'; use constant EMPTY_STRING => q{}; diff --git a/lib/Perl/Tidy/FileWriter.pm b/lib/Perl/Tidy/FileWriter.pm index 015ea75d..59cbfb6a 100644 --- a/lib/Perl/Tidy/FileWriter.pm +++ b/lib/Perl/Tidy/FileWriter.pm @@ -16,7 +16,7 @@ package Perl::Tidy::FileWriter; use strict; use warnings; -our $VERSION = '20240903.09'; +our $VERSION = '20250105'; use Carp; use constant DEVEL_MODE => 0; diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index cfb5ab39..07c0b231 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -76,7 +76,7 @@ use constant BACKSLASH => q{\\}; use Carp; use English qw( -no_match_vars ); use List::Util qw( min max first ); # min, max first are in Perl 5.8 -our $VERSION = '20240903.09'; +our $VERSION = '20250105'; # The Tokenizer will be loaded with the Formatter ##use Perl::Tidy::Tokenizer; # for is_keyword() @@ -6811,7 +6811,7 @@ sub initialize_missing_else_comment { my $comment = $rOpts->{'add-missing-else-comment'}; if ( !$comment ) { - $comment = "##FIXME - added with perltidy -ame"; + $comment = '##FIX' . 'ME - added with perltidy -ame'; } else { $comment = substr( $comment, 0, 60 ); diff --git a/lib/Perl/Tidy/HtmlWriter.pm b/lib/Perl/Tidy/HtmlWriter.pm index 87120b54..ec541250 100644 --- a/lib/Perl/Tidy/HtmlWriter.pm +++ b/lib/Perl/Tidy/HtmlWriter.pm @@ -7,7 +7,7 @@ package Perl::Tidy::HtmlWriter; use strict; use warnings; -our $VERSION = '20240903.09'; +our $VERSION = '20250105'; use Carp; use English qw( -no_match_vars ); diff --git a/lib/Perl/Tidy/IOScalar.pm b/lib/Perl/Tidy/IOScalar.pm index a8666ceb..40f7c1ef 100644 --- a/lib/Perl/Tidy/IOScalar.pm +++ b/lib/Perl/Tidy/IOScalar.pm @@ -10,7 +10,7 @@ package Perl::Tidy::IOScalar; use strict; use warnings; use Carp; -our $VERSION = '20240903.09'; +our $VERSION = '20250105'; use constant DEVEL_MODE => 0; use constant EMPTY_STRING => q{}; diff --git a/lib/Perl/Tidy/IOScalarArray.pm b/lib/Perl/Tidy/IOScalarArray.pm index 5e1e5005..8df31ca5 100644 --- a/lib/Perl/Tidy/IOScalarArray.pm +++ b/lib/Perl/Tidy/IOScalarArray.pm @@ -14,7 +14,7 @@ package Perl::Tidy::IOScalarArray; use strict; use warnings; use Carp; -our $VERSION = '20240903.09'; +our $VERSION = '20250105'; use constant DEVEL_MODE => 0; diff --git a/lib/Perl/Tidy/IndentationItem.pm b/lib/Perl/Tidy/IndentationItem.pm index d4fe09c5..987e1770 100644 --- a/lib/Perl/Tidy/IndentationItem.pm +++ b/lib/Perl/Tidy/IndentationItem.pm @@ -9,7 +9,7 @@ package Perl::Tidy::IndentationItem; use strict; use warnings; -our $VERSION = '20240903.09'; +our $VERSION = '20250105'; BEGIN { diff --git a/lib/Perl/Tidy/Logger.pm b/lib/Perl/Tidy/Logger.pm index 6dd15b1f..249b595e 100644 --- a/lib/Perl/Tidy/Logger.pm +++ b/lib/Perl/Tidy/Logger.pm @@ -8,7 +8,7 @@ package Perl::Tidy::Logger; use strict; use warnings; -our $VERSION = '20240903.09'; +our $VERSION = '20250105'; use Carp; use English qw( -no_match_vars ); diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index c245ab7c..4b7b9a4e 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -33,7 +33,7 @@ use strict; use warnings; use English qw( -no_match_vars ); -our $VERSION = '20240903.09'; +our $VERSION = '20250105'; use Carp; diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm index f609b70f..b22b78fc 100644 --- a/lib/Perl/Tidy/VerticalAligner.pm +++ b/lib/Perl/Tidy/VerticalAligner.pm @@ -5,7 +5,7 @@ use Carp; { #<<< A non-indenting brace to contain all lexical variables -our $VERSION = '20240903.09'; +our $VERSION = '20250105'; use English qw( -no_match_vars ); use Scalar::Util 'refaddr'; # perl 5.8.1 and later use Perl::Tidy::VerticalAligner::Alignment; diff --git a/lib/Perl/Tidy/VerticalAligner/Alignment.pm b/lib/Perl/Tidy/VerticalAligner/Alignment.pm index 0991b137..ecf3298d 100644 --- a/lib/Perl/Tidy/VerticalAligner/Alignment.pm +++ b/lib/Perl/Tidy/VerticalAligner/Alignment.pm @@ -9,7 +9,7 @@ package Perl::Tidy::VerticalAligner::Alignment; use strict; use warnings; -our $VERSION = '20240903.09'; +our $VERSION = '20250105'; sub new { my ( $class, $rarg ) = @_; diff --git a/lib/Perl/Tidy/VerticalAligner/Line.pm b/lib/Perl/Tidy/VerticalAligner/Line.pm index 4c509063..99432e77 100644 --- a/lib/Perl/Tidy/VerticalAligner/Line.pm +++ b/lib/Perl/Tidy/VerticalAligner/Line.pm @@ -10,7 +10,7 @@ package Perl::Tidy::VerticalAligner::Line; use strict; use warnings; -our $VERSION = '20240903.09'; +our $VERSION = '20250105'; use English qw( -no_match_vars ); sub AUTOLOAD { diff --git a/local-docs/Release-Checklist.md b/local-docs/Release-Checklist.md index 65c61702..cc3bc78e 100644 --- a/local-docs/Release-Checklist.md +++ b/local-docs/Release-Checklist.md @@ -4,7 +4,6 @@ - 'make test' successful for all commit candidates - run ``devbin/run_convergence_tests.pl`` for all commit candidates - run perlcritic - - run ``check_text.pl`` on all files - run NYTProf and check the activity and performance of all changed code - IMPORTANT: random testing minimum test duration without irregularities: - 3 cpu hours for a commit candidate -- 2.39.5