From: Steve Hancock Date: Sun, 17 Mar 2024 01:08:44 +0000 (-0700) Subject: add missing $self to warnings X-Git-Tag: 20240202.03~6 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=98d9bf8088ec2ab636e35b6fc2c8494a159134ed;p=perltidy.git add missing $self to warnings These were found with a new option being developed. These errors have never happened so the problem was not detected before. Also checking to see if latest github error goes away. --- diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index c39e2fa0..e9cbdbb5 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -8725,7 +8725,8 @@ sub do_scan_package { $identifier .= $tok; } else { # probable error in script, but keep going - warning("Unexpected '$tok' while seeking end of prototype\n"); + $self->warning( + "Unexpected '$tok' while seeking end of prototype\n"); $identifier .= $tok; } return; @@ -8937,7 +8938,7 @@ sub do_scan_package { "Program bug detected: scan_complex_identifier received bad starting token = '$tok'\n"; if (DEVEL_MODE) { $self->Fault($msg) } if ( !$self->[_in_error_] ) { - warning($msg); + $self->warning($msg); $self->[_in_error_] = 1; } $id_scan_state = EMPTY_STRING; @@ -9027,7 +9028,7 @@ EOM } if ( $id_scan_state eq $scan_state_RPAREN ) { - warning( + $self->warning( "Hit end of line while seeking ) to end prototype\n"); }