]> git.donarmstrong.com Git - perltidy.git/commitdiff
add missing $self to warnings
authorSteve Hancock <perltidy@users.sourceforge.net>
Sun, 17 Mar 2024 01:08:44 +0000 (18:08 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sun, 17 Mar 2024 01:08:44 +0000 (18:08 -0700)
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.

lib/Perl/Tidy/Tokenizer.pm

index c39e2fa09eb4f92206156fa0a388b58f1c29f97a..e9cbdbb5286e1346c36d9b2df1662a2595547624 100644 (file)
@@ -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");
                 }