Prechádzať zdrojové kódy

Say why call.pl could not chdir, rather than interpolating $_

The two warnings named $_ where they meant $!.  $_ is undefined there, and
under the fatal warnings call.pl now has, interpolating it dies, so a
failed chdir stopped the script instead of warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
troglodyne-bot 6 dní pred
rodič
commit
faa00a8620
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      call.pl

+ 2 - 2
call.pl

@@ -45,7 +45,7 @@ our $app = sub {
 
     # Allow re-run
     if (%cfg) {
-        chdir( $cfg{tpsgi_dir} ) || warn "Can't chdir to $cfg{tpsgi_dir}: $_";
+        chdir( $cfg{tpsgi_dir} ) || warn "Can't chdir to $cfg{tpsgi_dir}: $!";
     }
 
     %cfg = TPSGI::get_config();
@@ -54,7 +54,7 @@ our $app = sub {
     $cfg{verbose} = 1;
 
     # Change your dir into whatever basedir you need to be in
-    chdir( $cfg{'basedir'} ) || warn "Can't chdir to $cfg{'basedir'}: $_";
+    chdir( $cfg{'basedir'} ) || warn "Can't chdir to $cfg{'basedir'}: $!";
 
     # If we have manually set the NYTPROF var, use it and don't try to control
     # When to stop or start it.