Changeset 34087 for trunk/psconfig/pscheckmods
- Timestamp:
- Jun 26, 2012, 11:39:02 AM (14 years ago)
- File:
-
- 1 edited
-
trunk/psconfig/pscheckmods (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psconfig/pscheckmods
r31162 r34087 1 1 #!/usr/bin/env perl 2 2 3 $DEBUG = 0; 3 4 $VERBOSE = 0; 4 5 if (@ARGV > 2 && $ARGV[0] eq "-v") { … … 10 11 if ($VERBOSE) { print STDERR "checking in @INC\n"; } 11 12 12 # &detailed_require ($ARGV[0]); 13 if ($DEBUG) { &detailed_require ($ARGV[0]);} 13 14 14 15 $x = eval "require $ARGV[0]; 1"; … … 18 19 &detailed_require ($ARGV[0]); 19 20 } 20 if ($VERBOSE) { print " x: $x\n"; }21 if ($VERBOSE) { print "result of require: $x\n"; } 21 22 22 23 $version = eval "\$$ARGV[0]::VERSION"; … … 34 35 $filename =~ s|::|/|g; 35 36 $filename = "$filename.pm"; 36 print " $filename\n";37 print "\ntesting : $filename\n" if $DEBUG; 37 38 if (exists $INC{$filename}) { 38 39 return 1 if $INC{$filename}; 39 die "Compilation failed in require";40 40 } 41 41 my ($realfilename,$result); … … 43 43 foreach $prefix (@INC) { 44 44 $realfilename = "$prefix/$filename"; 45 print " $realfilename\n";45 print "real: $realfilename\n" if $DEBUG; 46 46 if (-f $realfilename) { 47 47 $INC{$filename} = $realfilename; 48 print "calling 'do' on $realfilename\n" if $DEBUG; 48 49 $result = do $realfilename; 50 print "result: $result\n" if $DEBUG; 49 51 last ITER; 50 52 } … … 53 55 } 54 56 if ($@) { 57 print "$@" if $DEBUG; 55 58 $INC{$filename} = undef; 56 59 die $@; 57 60 } elsif (!$result) { 61 print "no result\n" if $DEBUG; 58 62 delete $INC{$filename}; 59 63 die "$filename did not return true value"; 60 64 } else { 65 print "done with detailed_require\n" if $DEBUG; 61 66 return $result; 62 67 }
Note:
See TracChangeset
for help on using the changeset viewer.
