From: Steve Hancock Date: Fri, 13 Oct 2023 19:45:56 +0000 (-0700) Subject: put global my vars in a closure X-Git-Tag: 20230912.04~8 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=eb2409fa8ec0edc23198ae184b54afb13613c0b4;p=perltidy.git put global my vars in a closure --- diff --git a/lib/Perl/Tidy/HtmlWriter.pm b/lib/Perl/Tidy/HtmlWriter.pm index 6972c490..a8ba8e27 100644 --- a/lib/Perl/Tidy/HtmlWriter.pm +++ b/lib/Perl/Tidy/HtmlWriter.pm @@ -15,6 +15,8 @@ use File::Basename; use constant EMPTY_STRING => q{}; use constant SPACE => q{ }; +{ #<<< A non-indenting brace to contain all lexical variables + # class variables my ( @@ -1543,4 +1545,6 @@ EOM $html_pre_fh->print("$html_line\n"); return; } ## end sub write_line + +} ## end package Perl::Tidy::HtmlWriter 1; diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index 016be88d..3e311702 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -41,6 +41,8 @@ use constant DEVEL_MODE => 0; use constant EMPTY_STRING => q{}; use constant SPACE => q{ }; +{ #<<< A non-indenting brace to contain all lexical variables + # Parent sequence number of tree of containers; must be 1 use constant SEQ_ROOT => 1; @@ -11018,4 +11020,6 @@ BEGIN { '<' => '>', ); } ## end BEGIN + +} ## end package Perl::Tidy::Tokenizer 1;