[system] / trunk / webwork2 / bin / check_modules.pl Repository:
ViewVC logotype

Diff of /trunk/webwork2/bin/check_modules.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.3984  
changed lines
  Added in v.3985

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9