| 1 | #!/usr/bin/perl -w |
1 | #!/usr/bin/perl |
|
|
2 | |
|
|
3 | use strict; |
|
|
4 | use warnings; |
| 2 | |
5 | |
| 3 | my @modulesList = qw( |
6 | my @modulesList = qw( |
|
|
7 | Apache |
| 4 | Apache::Constants |
8 | Apache::Constants |
| 5 | Apache::Cookie |
9 | Apache::Cookie |
|
|
10 | Apache::Log |
| 6 | Apache::Request |
11 | Apache::Request |
|
|
12 | Benchmark |
| 7 | Carp |
13 | Carp |
| 8 | CGI |
14 | CGI |
| 9 | CGI::Pretty |
|
|
| 10 | Data::Dumper |
15 | Data::Dumper |
| 11 | Data::UUID |
16 | Data::UUID |
| 12 | Date::Format |
17 | Date::Format |
| 13 | Date::Parse |
18 | Date::Parse |
|
|
19 | DateTime |
| 14 | DBI |
20 | DBI |
| 15 | Digest::MD5 |
21 | Digest::MD5 |
| 16 | Errno |
22 | Errno |
|
|
23 | Fcntl |
| 17 | File::Copy |
24 | File::Copy |
|
|
25 | File::Find |
| 18 | File::Path |
26 | File::Path |
|
|
27 | File::Spec |
|
|
28 | File::stat |
| 19 | File::Temp |
29 | File::Temp |
|
|
30 | Getopt::Long |
|
|
31 | Getopt::Std |
| 20 | HTML::Entities |
32 | HTML::Entities |
|
|
33 | IO::File |
| 21 | Mail::Sender |
34 | Mail::Sender |
| 22 | Net::SMTP |
35 | MIME::Base64 |
| 23 | Opcode |
36 | Opcode |
|
|
37 | Pod::Usage |
| 24 | Safe |
38 | Safe |
| 25 | SOAP::Lite |
39 | Socket |
|
|
40 | String::ShellQuote |
| 26 | Text::Wrap |
41 | Text::Wrap |
| 27 | Time::HiRes |
42 | Time::HiRes |
|
|
43 | Time::Zone |
| 28 | URI::Escape |
44 | URI::Escape |
| 29 | XML::Parser |
45 | XML::Parser |
| 30 | XML::Parser::EasyTree |
46 | XML::Parser::EasyTree |
| 31 | XML::Writer |
47 | XML::Writer |
|
|
48 | WheeWhaa |
| 32 | ); |
49 | ); |
| 33 | |
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 | |
| 34 | my @applicationsList = qw( |
59 | my @applicationsList = qw( |
| 35 | dvipng |
60 | mkdir |
| 36 | giftopnm |
61 | mv |
|
|
62 | mysql |
|
|
63 | tar |
| 37 | latex |
64 | latex |
| 38 | pdflatex |
65 | pdflatex |
|
|
66 | dvipng |
|
|
67 | tth |
|
|
68 | giftopnm |
|
|
69 | ppmtopgm |
|
|
70 | pnmtops |
|
|
71 | pnmtopng |
| 39 | pngtopnm |
72 | pngtopnm |
| 40 | pnmtopng |
|
|
| 41 | pnmtops |
|
|
| 42 | ppmtopgm |
|
|
| 43 | tth |
|
|
| 44 | ); |
73 | ); |
| 45 | |
74 | |
| 46 | print "\nSearching for executables\n\n"; |
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"; |
| 47 | |
79 | |
| 48 | foreach my $app (@applicationsList) { |
80 | foreach my $app (@applicationsList) { |
| 49 | my $result = `which $app`; |
81 | my $result = `which $app`; |
| 50 | chomp($result); |
82 | chomp($result); |
| 51 | if ($result) { |
83 | if ($result) { |
| 52 | print "$app found at $result\n"; |
84 | print " $app found at $result\n"; |
| 53 | } else { |
85 | } else { |
| 54 | print "***** Can't find $app\n"; |
86 | print "** $app not found in \$PATH\n"; |
| 55 | } |
87 | } |
| 56 | } |
88 | } |
| 57 | |
89 | |
| 58 | print "\nSearching for modules needed for WeBWorK\n\n"; |
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"; |
| 59 | |
94 | |
| 60 | foreach my $module (@modulesList) { |
95 | foreach my $module (@modulesList) { |
| 61 | eval "use $module"; |
96 | eval "use $module"; |
| 62 | if ($@) { |
97 | if ($@) { |
| 63 | print "***** Can't find $module\n"; |
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 | } |
| 64 | } else { |
106 | } else { |
| 65 | print "$module found. \n"; |
107 | print " $module found and loaded\n"; |
| 66 | } |
108 | } |
| 67 | } |
109 | } |