IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 6, 2024, 12:43:47 PM (20 months ago)
Author:
eugene
Message:

add improved debug options to pscheckmods

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psconfig/pscheckmods

    r41583 r42744  
    33$DEBUG = 0;
    44$VERBOSE = 0;
     5if (@ARGV > 2 && $ARGV[0] eq "-v") {
     6    $VERBOSE = 1;
     7    shift @ARGV;
     8}
     9if (@ARGV > 2 && $ARGV[0] eq "-debug") {
     10    $DEBUG = 1;
     11    shift @ARGV;
     12}
    513if (@ARGV > 2 && $ARGV[0] eq "-v") {
    614    $VERBOSE = 1;
     
    5563    my ($realfilename,$result);
    5664  ITER: {
     65      my $found = 0;
    5766      foreach $prefix (@INC) {
    5867          $realfilename = "$prefix/$filename";
    59           print "real: $realfilename\n" if $DEBUG;
     68          print "try: $realfilename\n" if $DEBUG;
    6069          if (-f $realfilename) {
    6170              $INC{$filename} = $realfilename;
     
    6372              $result = do $realfilename;
    6473              print "result: $result\n" if $DEBUG;
    65               last ITER;
     74              if (! $DEBUG) { last ITER; }
     75              $found = 1;
    6676          }
    6777      }
    68       die "Can't find $filename in \@INC";
     78      if (!$found) { die "Can't find $filename in \@INC"; }
    6979    }
    7080    if ($@) {
Note: See TracChangeset for help on using the changeset viewer.