From eb340225c8a5cfba8d190c14fb17884debdd5fed Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Sat, 6 Apr 2024 19:07:49 -0700 Subject: [PATCH] update docs & comments --- bin/perltidy | 2 +- lib/Perl/Tidy.pm | 2 +- lib/Perl/Tidy/Logger.pm | 6 +++++- lib/Perl/Tidy/Tokenizer.pm | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/perltidy b/bin/perltidy index fa0530fe..a08c51ff 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -6102,7 +6102,7 @@ B =over 4 =item * -Only subs for which the call args are unpacked in an orderly manner at the beginning of the sub from C<@_>, directly and/or with C operations, are checked. Subs for which this does not appear to be the case are skipped. +The only subs which these checks are made are those for which the call args are unpacked in an orderly manner at the beginning of the sub from C<@_>, directly and/or with C operations. =item * Subs which appear to have no args are not checked. This is necessary to avoid false warnings when a sub actually uses args in a complex way. diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index 1d710ea0..73162857 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -5516,7 +5516,7 @@ sub Win_Config_Locs { # 9x/Me box. Contributed by: Yves Orton. my ( $rpending_complaint, $os ) = @_; - if ( !$os ) { $os = Win_OS_Type(); } + if ( !$os ) { $os = Win_OS_Type($rpending_complaint) } return unless $os; diff --git a/lib/Perl/Tidy/Logger.pm b/lib/Perl/Tidy/Logger.pm index 8493f09a..1bd2b291 100644 --- a/lib/Perl/Tidy/Logger.pm +++ b/lib/Perl/Tidy/Logger.pm @@ -372,9 +372,13 @@ sub complain { sub warning { - # report errors to .ERR file (or stdout) my ( $self, $msg, $msg_line_number ) = @_; + # Report errors to .ERR file (or stdout) + # Given: + # $msg = a string with the warning message + # $msg_line_number = optional line number to display + use constant WARNING_LIMIT => 50; # Always bump the warn count, even if no message goes out diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index 12295be5..effdcfd3 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -9115,7 +9115,7 @@ EOM RETURN: DEBUG_SCAN_ID && do { - my ( $a, $b, $c ) = caller; + my ( $a, $b, $c ) = caller(); print {*STDOUT} "SCANID: called from $a $b $c with tok, i, state, identifier =$tok_begin, $i_begin, $id_scan_state_begin, $identifier_begin\n"; print {*STDOUT} -- 2.39.5