Parent Directory
|
Revision Log
forward-port from rel-2-2-dev: (Updated modules/executables list, cleaned up output. Output now specifies that $PATH is being searched for executables, and lists the contents of $PATH. Same with @INC. It's a little easier to tell if a module/executable has not been found: The "found" lines are prefixed by some space, which makes the not found '**' prefix stand out. When a module fails to load, but it's not because it wasn't found, the error message is given.)
1 #!/usr/bin/perl 2 3 use strict; 4 use warnings; 5 6 my @modulesList = qw( 7 Apache 8 Apache::Constants 9 Apache::Cookie 10 Apache::Log 11 Apache::Request 12 Benchmark 13 Carp 14 CGI 15 Data::Dumper 16 Data::UUID 17 Date::Format 18 Date::Parse 19 DateTime 20 DBI 21 Digest::MD5 22 Errno 23 Fcntl 24 File::Copy 25 File::Find 26 File::Path 27 File::Spec 28 File::stat 29 File::Temp 30 Getopt::Long 31 Getopt::Std 32 HTML::Entities 33 IO::File 34 Mail::Sender 35 MIME::Base64 36 Opcode 37 Pod::Usage 38 Safe 39 Socket 40 String::ShellQuote 41 Text::Wrap 42 Time::HiRes 43 Time::Zone 44 URI::Escape 45 XML::Parser 46 XML::Parser::EasyTree 47 XML::Writer 48 WheeWhaa 49 ); 50 51 # modules used by disabled code 52 # Class::Data::Inheritable (DBv3) 53 # Class::DBI::Plugin::AbstractCount (DBv3) 54 # DateTime::Format::DBI (DBv3) 55 # GDBM_File (Driver::GDBM) 56 # RQP::Render (RQP) 57 # SOAP::Lite (PG::Remote) 58 59 my @applicationsList = qw( 60 mkdir 61 mv 62 mysql 63 tar 64 latex 65 pdflatex 66 dvipng 67 tth 68 giftopnm 69 ppmtopgm 70 pnmtops 71 pnmtopng 72 pngtopnm 73 ); 74 75 print "\nChecking your \$PATH for executables required by WeBWorK...\n"; 76 my @path = split(/:/, $ENV{PATH}); 77 print "\$PATH=", shift @path, "\n"; 78 print join ("\n", map(" $_", @path)), "\n\n"; 79 80 foreach my $app (@applicationsList) { 81 my $result = `which $app`; 82 chomp($result); 83 if ($result) { 84 print " $app found at $result\n"; 85 } else { 86 print "** $app not found in \$PATH\n"; 87 } 88 } 89 90 print "\nLoading Perl modules required by WeBWorK...\n"; 91 my @inc = @INC; 92 print "\@INC=", shift @inc, "\n"; 93 print join ("\n", map(" $_", @inc)), "\n\n"; 94 95 foreach my $module (@modulesList) { 96 eval "use $module"; 97 if ($@) { 98 my $file = $module; 99 $file =~ s|::|/|g; 100 $file .= ".pm"; 101 if ($@ =~ /Can't locate $file in \@INC/) { 102 print "** $module not found in \@INC\n"; 103 } else { 104 print "** $module found, but failed to load: $@"; 105 } 106 } else { 107 print " $module found and loaded\n"; 108 } 109 }
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |