Changeset 34022 for branches/eam_branches/ipp-20120601/psconfig/pscheckmods
- Timestamp:
- Jun 17, 2012, 5:56:15 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120601/psconfig/pscheckmods
r33995 r34022 1 1 #!/usr/bin/env perl 2 2 3 $DEBUG = 1; 3 4 $VERBOSE = 0; 4 5 if (@ARGV > 2 && $ARGV[0] eq "-v") { … … 16 17 ## XXX EAM exit 2; 17 18 18 #&detailed_require ($ARGV[0]);19 &detailed_require ($ARGV[0]); 19 20 20 21 $x = eval "require $ARGV[0]; 1"; … … 40 41 $filename =~ s|::|/|g; 41 42 $filename = "$filename.pm"; 42 # print "$filename\n";43 print "\ntesting : $filename\n" if $DEBUG; 43 44 if (exists $INC{$filename}) { 44 45 return 1 if $INC{$filename}; … … 49 50 foreach $prefix (@INC) { 50 51 $realfilename = "$prefix/$filename"; 51 # print "real: $realfilename\n";52 print "real: $realfilename\n" if $DEBUG; 52 53 if (-f $realfilename) { 53 54 $INC{$filename} = $realfilename; 54 # print "calling 'do' on $realfilename\n";55 print "calling 'do' on $realfilename\n" if $DEBUG; 55 56 $result = do $realfilename; 56 # print "result: $result\n"; 57 # exit 4; 57 print "result: $result\n" if $DEBUG; 58 58 last ITER; 59 59 } … … 61 61 die "Can't find $filename in \@INC"; 62 62 } 63 # print "here 1\n";64 63 if ($@) { 65 # print "here 2\n"; 66 # print "$@"; 64 print "$@" if $DEBUG; 67 65 $INC{$filename} = undef; 68 # print "here 2a\n";69 exit 2;70 66 die $@; 71 67 } elsif (!$result) { 72 # print "here 3\n"; 73 # print "no result\n"; 74 exit 2; 68 print "no result\n" if $DEBUG; 75 69 delete $INC{$filename}; 76 70 die "$filename did not return true value"; 77 71 } else { 78 # print "here 4\n"; 79 # print "done with detailed_require\n"; 80 exit 2; 72 print "done with detailed_require\n" if $DEBUG; 81 73 return $result; 82 74 }
Note:
See TracChangeset
for help on using the changeset viewer.
