From: Steve Hancock Date: Sat, 20 Nov 2021 15:43:20 +0000 (-0800) Subject: bump version to 20211029.01 X-Git-Tag: 20211029.01^0 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=df4e69a7c90dbf2aebfed5a2fc3e81b3423a2ea0;p=perltidy.git bump version to 20211029.01 --- diff --git a/CHANGES.md b/CHANGES.md index 34541c4a..b8d8deb3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,9 +1,20 @@ # Perltidy Change Log -## 2021 10 29 xx +## 2021 10 29.01 - The coding for the -lp flag has been rewritten to avoid some problems - and limitations. + and limitations. The new coding allows the -lp indentation style to + mix smoothly with the standard indentation in a single file. Some problems + where -lp and -xci flags were not working well together have been fixed, such + as happened in issue rt140025. + + - A new flag -xlp has been added which can be set to avoid most of the + limitations of the -lp flag regarding side comments, blank lines, and + code blocks. This is off by default to avoid changing existing coding, + so this flag has to be set to turn this feature on. [Documentation still + needs to be written]. It will be included in the next release to CPAN, + but some details regarding how it handles very long lines may change before + the final release to CPAN. This fixes issues git #64 and git #74. ## 2021 10 29 diff --git a/bin/perltidy b/bin/perltidy index 0ce77be6..a955a143 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -4898,7 +4898,7 @@ The perltidy binary uses the Perl::Tidy module and is installed when that module =head1 VERSION -This man page documents perltidy version 20211029 +This man page documents perltidy version 20211029.01 =head1 BUG REPORTS diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index 71965ba6..7b554026 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -110,7 +110,7 @@ BEGIN { # Release version must be bumped, and it is probably past time for a # release anyway. - $VERSION = '20211029'; + $VERSION = '20211029.01'; } sub DESTROY { diff --git a/lib/Perl/Tidy.pod b/lib/Perl/Tidy.pod index 50b512b9..762a8760 100644 --- a/lib/Perl/Tidy.pod +++ b/lib/Perl/Tidy.pod @@ -432,7 +432,7 @@ The module 'Perl::Tidy' comes with a binary 'perltidy' which is installed when t =head1 VERSION -This man page documents Perl::Tidy version 20211029 +This man page documents Perl::Tidy version 20211029.01 =head1 LICENSE diff --git a/lib/Perl/Tidy/Debugger.pm b/lib/Perl/Tidy/Debugger.pm index 691c9b9e..6992143f 100644 --- a/lib/Perl/Tidy/Debugger.pm +++ b/lib/Perl/Tidy/Debugger.pm @@ -7,7 +7,7 @@ package Perl::Tidy::Debugger; use strict; use warnings; -our $VERSION = '20211029'; +our $VERSION = '20211029.01'; sub new { diff --git a/lib/Perl/Tidy/DevNull.pm b/lib/Perl/Tidy/DevNull.pm index f9a14b2e..59e6b1f4 100644 --- a/lib/Perl/Tidy/DevNull.pm +++ b/lib/Perl/Tidy/DevNull.pm @@ -7,7 +7,7 @@ package Perl::Tidy::DevNull; use strict; use warnings; -our $VERSION = '20211029'; +our $VERSION = '20211029.01'; sub new { my $self = shift; return bless {}, $self } sub print { return } sub close { return } diff --git a/lib/Perl/Tidy/Diagnostics.pm b/lib/Perl/Tidy/Diagnostics.pm index e7618262..f3e9b499 100644 --- a/lib/Perl/Tidy/Diagnostics.pm +++ b/lib/Perl/Tidy/Diagnostics.pm @@ -20,7 +20,7 @@ package Perl::Tidy::Diagnostics; use strict; use warnings; -our $VERSION = '20211029'; +our $VERSION = '20211029.01'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/FileWriter.pm b/lib/Perl/Tidy/FileWriter.pm index 0f124b4d..031cc6fa 100644 --- a/lib/Perl/Tidy/FileWriter.pm +++ b/lib/Perl/Tidy/FileWriter.pm @@ -7,7 +7,7 @@ package Perl::Tidy::FileWriter; use strict; use warnings; -our $VERSION = '20211029'; +our $VERSION = '20211029.01'; use constant DEVEL_MODE => 0; diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index a96d2f51..756c9467 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -49,7 +49,7 @@ use constant DEVEL_MODE => 0; { #<<< A non-indenting brace to contain all lexical variables use Carp; -our $VERSION = '20211029'; +our $VERSION = '20211029.01'; # The Tokenizer will be loaded with the Formatter ##use Perl::Tidy::Tokenizer; # for is_keyword() @@ -709,7 +709,7 @@ sub new { initialize_undo_ci(); initialize_process_line_of_CODE(); initialize_grind_batch_of_CODE(); - initialize_adjusted_indentation(); + initialize_final_indentation_adjustment(); initialize_postponed_breakpoint(); initialize_batch_variables(); initialize_forced_breakpoint_vars(); @@ -9728,7 +9728,7 @@ sub break_before_list_opening_containers { next unless ($ci_flag); # -bbxi=1: This option removes ci and is handled in - # later sub set_adjusted_indentation + # later sub final_indentation_adjustment if ( $ci_flag == 1 ) { $rwant_reduced_ci->{$seqno} = 1; next; @@ -14999,7 +14999,7 @@ sub break_equals { # trailing clause will be far to the right. # # The logic here is synchronized with the logic in sub - # sub set_adjusted_indentation, which actually does + # sub final_indentation_adjustment, which actually does # the outdenting. # $skip_Section_3 ||= $this_line_is_semicolon_terminated @@ -15050,7 +15050,7 @@ sub break_equals { # #handle error # }; # The alternative, for uncuddled style, is to create - # a patch in set_adjusted_indentation which undoes + # a patch in final_indentation_adjustment which undoes # the indentation of a leading line like 'or do {'. # This doesn't work well with -icb through if ( @@ -20602,7 +20602,7 @@ sub convey_batch_to_vertical_aligner { my $Kend_code = $batch_CODE_type && $batch_CODE_type ne 'VER' ? undef : $Kend; - # $ljump is a level jump needed by 'sub set_adjusted_indentation' + # $ljump is a level jump needed by 'sub final_indentation_adjustment' my $ljump = 0; # Get some vars on line [n+1], if any: @@ -20668,7 +20668,7 @@ EOM # -------------------------------------- my ( $indentation, $lev, $level_end, $terminal_type, $terminal_block_type, $is_semicolon_terminated, $is_outdented_line ) - = $self->set_adjusted_indentation( $ibeg, $iend, $rfields, + = $self->final_indentation_adjustment( $ibeg, $iend, $rfields, $rpatterns, $ri_first, $ri_last, $rindentation_list, $ljump, $starting_in_quote, $is_static_block_comment, ); @@ -20963,7 +20963,7 @@ EOM } ## end of loop to output each line # remember indentation of lines containing opening containers for - # later use by sub set_adjusted_indentation + # later use by sub final_indentation_adjustment $self->save_opening_indentation( $ri_first, $ri_last, $rindentation_list ) if ( !$is_block_comment ); @@ -21705,7 +21705,7 @@ sub get_seqno { # SECTION 2: Undo ci at cuddled blocks #------------------------------------- - # Note that sub set_adjusted_indentation will be called later to + # Note that sub final_indentation_adjustment will be called later to # actually do this, but for now we will tentatively mark cuddled # lines with ci=0 so that the the -xci loop which follows will be # correct at cuddles. @@ -22920,25 +22920,27 @@ sub make_paren_name { return $name; } -{ ## begin closure set_adjusted_indentation +{ ## begin closure final_indentation_adjustment my ( $last_indentation_written, $last_unadjusted_indentation, $last_leading_token ); - sub initialize_adjusted_indentation { + sub initialize_final_indentation_adjustment { $last_indentation_written = 0; $last_unadjusted_indentation = 0; $last_leading_token = ""; return; } - sub set_adjusted_indentation { + sub final_indentation_adjustment { - # This routine has the final say regarding the actual indentation of - # a line. It starts with the basic indentation which has been - # defined for the leading token, and then takes into account any - # options that the user has set regarding special indenting and - # outdenting. + #-------------------------------------------------------------------- + # This routine sets the final indentation of a line in the Formatter. + #-------------------------------------------------------------------- + + # It starts with the basic indentation which has been defined for the + # leading token, and then takes into account any options that the user + # has set regarding special indenting and outdenting. # This routine has to resolve a number of complex interacting issues, # including: @@ -23682,7 +23684,7 @@ sub make_paren_name { $terminal_block_type, $is_semicolon_terminated, $is_outdented_line ); } -} ## end closure set_adjusted_indentation +} ## end closure final_indentation_adjustment sub get_opening_indentation { diff --git a/lib/Perl/Tidy/HtmlWriter.pm b/lib/Perl/Tidy/HtmlWriter.pm index 6f55c517..6a816906 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 = '20211029'; +our $VERSION = '20211029.01'; use File::Basename; diff --git a/lib/Perl/Tidy/IOScalar.pm b/lib/Perl/Tidy/IOScalar.pm index 3d5adae4..314bd165 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 = '20211029'; +our $VERSION = '20211029.01'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/IOScalarArray.pm b/lib/Perl/Tidy/IOScalarArray.pm index 1eea51d0..0421a1af 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 = '20211029'; +our $VERSION = '20211029.01'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/IndentationItem.pm b/lib/Perl/Tidy/IndentationItem.pm index 86cbf4c5..aee0a7bc 100644 --- a/lib/Perl/Tidy/IndentationItem.pm +++ b/lib/Perl/Tidy/IndentationItem.pm @@ -8,7 +8,7 @@ package Perl::Tidy::IndentationItem; use strict; use warnings; -our $VERSION = '20211029'; +our $VERSION = '20211029.01'; BEGIN { diff --git a/lib/Perl/Tidy/LineBuffer.pm b/lib/Perl/Tidy/LineBuffer.pm index 29d7dd2f..15d0021e 100644 --- a/lib/Perl/Tidy/LineBuffer.pm +++ b/lib/Perl/Tidy/LineBuffer.pm @@ -12,7 +12,7 @@ package Perl::Tidy::LineBuffer; use strict; use warnings; -our $VERSION = '20211029'; +our $VERSION = '20211029.01'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/LineSink.pm b/lib/Perl/Tidy/LineSink.pm index 7825c273..72f19d50 100644 --- a/lib/Perl/Tidy/LineSink.pm +++ b/lib/Perl/Tidy/LineSink.pm @@ -8,7 +8,7 @@ package Perl::Tidy::LineSink; use strict; use warnings; -our $VERSION = '20211029'; +our $VERSION = '20211029.01'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/LineSource.pm b/lib/Perl/Tidy/LineSource.pm index 91987c71..68c6f79b 100644 --- a/lib/Perl/Tidy/LineSource.pm +++ b/lib/Perl/Tidy/LineSource.pm @@ -8,7 +8,7 @@ package Perl::Tidy::LineSource; use strict; use warnings; -our $VERSION = '20211029'; +our $VERSION = '20211029.01'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/Logger.pm b/lib/Perl/Tidy/Logger.pm index 91c52be5..dd8d407b 100644 --- a/lib/Perl/Tidy/Logger.pm +++ b/lib/Perl/Tidy/Logger.pm @@ -7,7 +7,7 @@ package Perl::Tidy::Logger; use strict; use warnings; -our $VERSION = '20211029'; +our $VERSION = '20211029.01'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index 73739d0c..8ae4b7e6 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -21,7 +21,7 @@ package Perl::Tidy::Tokenizer; use strict; use warnings; -our $VERSION = '20211029'; +our $VERSION = '20211029.01'; # this can be turned on for extra checking during development use constant DEVEL_MODE => 0; diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm index 1864b7e0..f3c38579 100644 --- a/lib/Perl/Tidy/VerticalAligner.pm +++ b/lib/Perl/Tidy/VerticalAligner.pm @@ -2,7 +2,7 @@ package Perl::Tidy::VerticalAligner; use strict; use warnings; use Carp; -our $VERSION = '20211029'; +our $VERSION = '20211029.01'; use Perl::Tidy::VerticalAligner::Alignment; use Perl::Tidy::VerticalAligner::Line; diff --git a/lib/Perl/Tidy/VerticalAligner/Alignment.pm b/lib/Perl/Tidy/VerticalAligner/Alignment.pm index 0d2e6d90..f2cac976 100644 --- a/lib/Perl/Tidy/VerticalAligner/Alignment.pm +++ b/lib/Perl/Tidy/VerticalAligner/Alignment.pm @@ -10,7 +10,7 @@ use warnings; { #<<< A non-indenting brace -our $VERSION = '20211029'; +our $VERSION = '20211029.01'; BEGIN { diff --git a/lib/Perl/Tidy/VerticalAligner/Line.pm b/lib/Perl/Tidy/VerticalAligner/Line.pm index 68f9e0e8..caae9d78 100644 --- a/lib/Perl/Tidy/VerticalAligner/Line.pm +++ b/lib/Perl/Tidy/VerticalAligner/Line.pm @@ -8,7 +8,7 @@ package Perl::Tidy::VerticalAligner::Line; use strict; use warnings; -our $VERSION = '20211029'; +our $VERSION = '20211029.01'; BEGIN {