Annotation of loncom/build/system_dependencies/perltest.pl, revision 1.3

1.1       harris41    1: #!/usr/bin/perl
                      2: 
                      3: # The LearningOnline Network with CAPA
                      4: #
                      5: # Testing to see if all needed perl components are on
                      6: # a system
                      7: #
                      8: # YEAR=2001
                      9: # 9/30 Scott Harrison
                     10: #
                     11: # I wish there were a more straightforward way to do this.  But I can't
                     12: # seem to find the right internals in the perl programming language.
                     13: # Also, this program is only a "modest" effort to LOOK and see whether
                     14: # necessary perl system dependencies are present.  I do not yet
                     15: # try to actually run tests against each needed perl module.
                     16: 
                     17: # --------------------------------- Make sure the perl version is suitably high
                     18: my $ret=system("find --version 1>/dev/null");
                     19: if ($]<5.005) {
                     20:     die "DEPENDENCY FAILURE: LON-CAPA requires perl version >= 5.005.\n";
                     21: }
                     22: 
                     23: # ------------------------------------------ Make sure we have the find command
                     24: my $ret=system("find --version 1>/dev/null");
                     25: if ($ret) {
                     26:     die "DEPENDENCY FAILURE: A test program requires the GNU ".
                     27: 	"'find' utility.\n";
                     28: }
                     29: 
                     30: # ----------------------------------------- Read in all the system perl modules
                     31: print "Scanning for perl modules...\n";
                     32: my $modules; 
                     33: foreach my $inc (@INC) {
                     34:     my @m=`find $inc -type f -name '*.pm'`;
                     35:     foreach my $mod (@m) {
                     36: 	$modules.=$mod;
                     37:     }
                     38: }
                     39: 
                     40: # --------------- Seeing if dependencies are in our "full" list of perl modules
                     41: my %dependencies=qw(
                     42: 		    GD/Barcode.pm 1
                     43: 		    GD/Barcode/COOP2of5.pm 1
                     44: 		    GD/Barcode/Code39.pm 1
                     45: 		    GD/Barcode/EAN13.pm 1
                     46: 		    GD/Barcode/EAN8.pm 1
                     47: 		    GD/Barcode/IATA2of5.pm 1
                     48: 		    GD/Barcode/ITF.pm 1
                     49: 		    GD/Barcode/Industrial2of5.pm 1
                     50: 		    GD/Barcode/Matrix2of5.pm 1
                     51: 		    GD/Barcode/NW7.pm 1
                     52: 		    GD/Barcode/UPCA.pm 1
                     53: 		    GD/Barcode/UPCE.pm 1
                     54: 		    IO/Dir.pm 1
                     55: 		    IO/Poll.pm 1
                     56: 		    IO/Socket/INET.pm 1
                     57: 		    IO/Socket/UNIX.pm 1
                     58: 		    Algorithm/Diff.pm 1
                     59: 		    Algorithm/DiffOld.pm 1
                     60: 		    Bundle/LWP.pm 1
                     61: 		    File/Listing.pm 1
                     62: 		    HTML/AsSubs.pm 1
                     63: 		    HTML/Element.pm 1
                     64: 		    HTML/Element/traverse.pm 1
                     65: 		    HTML/Form.pm 1
                     66: 		    HTML/Parse.pm 1
                     67: 		    HTML/Tagset.pm 1
                     68: 		    HTML/Tree.pm 1
                     69: 		    HTML/TreeBuilder.pm 1
                     70: 		    HTTP/Cookies.pm 1
                     71: 		    HTTP/Daemon.pm 1
                     72: 		    HTTP/Date.pm 1
                     73: 		    HTTP/Headers.pm 1
                     74: 		    HTTP/Headers/Auth.pm 1
                     75: 		    HTTP/Headers/ETag.pm 1
                     76: 		    HTTP/Headers/Util.pm 1
                     77: 		    HTTP/Message.pm 1
                     78: 		    HTTP/Negotiate.pm 1
                     79: 		    HTTP/Request.pm 1
                     80: 		    HTTP/Request/Common.pm 1
                     81: 		    HTTP/Response.pm 1
                     82: 		    HTTP/Status.pm 1
                     83: 		    LWP.pm 1
                     84: 		    LWP/Authen/Basic.pm 1
                     85: 		    LWP/Authen/Digest.pm 1
                     86: 		    LWP/Debug.pm 1
                     87: 		    LWP/MediaTypes.pm 1
                     88: 		    LWP/MemberMixin.pm 1
                     89: 		    LWP/Protocol.pm 1
                     90: 		    LWP/Protocol/data.pm 1
                     91: 		    LWP/Protocol/file.pm 1
                     92: 		    LWP/Protocol/ftp.pm 1
                     93: 		    LWP/Protocol/gopher.pm 1
                     94: 		    LWP/Protocol/http.pm 1
                     95: 		    LWP/Protocol/https.pm 1
                     96: 		    LWP/Protocol/mailto.pm 1
                     97: 		    LWP/Protocol/nntp.pm 1
                     98: 		    LWP/RobotUA.pm 1
                     99: 		    LWP/Simple.pm 1
                    100: 		    LWP/UserAgent.pm 1
                    101: 		    MIME/Body.pm 1
                    102: 		    MIME/Decoder.pm 1
                    103: 		    MIME/Decoder/Base64.pm 1
                    104: 		    MIME/Decoder/Binary.pm 1
                    105: 		    MIME/Decoder/Gzip64.pm 1
                    106: 		    MIME/Decoder/NBit.pm 1
                    107: 		    MIME/Decoder/QuotedPrint.pm 1
                    108: 		    MIME/Decoder/UU.pm 1
                    109: 		    MIME/Entity.pm 1
                    110: 		    MIME/Field/ConTraEnc.pm 1
                    111: 		    MIME/Field/ContDisp.pm 1
                    112: 		    MIME/Field/ContType.pm 1
                    113: 		    MIME/Field/ParamVal.pm 1
                    114: 		    MIME/Head.pm 1
                    115: 		    MIME/Parser.pm 1
                    116: 		    MIME/Parser/Filer.pm 1
                    117: 		    MIME/Parser/Reader.pm 1
                    118: 		    MIME/Parser/Results.pm 1
                    119: 		    MIME/Tools.pm 1
                    120: 		    MIME/Words.pm 1
                    121: 		    Net/Cmd.pm 1
                    122: 		    Net/Config.pm 1
                    123: 		    Net/Domain.pm 1
                    124: 		    Net/FTP.pm 1
                    125: 		    Net/FTP/A.pm 1
                    126: 		    Net/FTP/E.pm 1
                    127: 		    Net/FTP/I.pm 1
                    128: 		    Net/FTP/L.pm 1
                    129: 		    Net/FTP/dataconn.pm 1
                    130: 		    Net/NNTP.pm 1
                    131: 		    Net/Netrc.pm 1
                    132: 		    Net/PH.pm 1
                    133: 		    Net/POP3.pm 1
                    134: 		    Net/SMTP.pm 1
                    135: 		    Net/SNPP.pm 1
                    136: 		    Net/Time.pm 1
                    137: 		    Text/Query.pm 1
                    138: 		    Text/Query/Advanced.pm 1
                    139: 		    Text/Query/Build.pm 1
                    140: 		    Text/Query/BuildAdvancedString.pm 1
                    141: 		    Text/Query/BuildSimpleString.pm 1
                    142: 		    Text/Query/Optimize.pm 1
                    143: 		    Text/Query/Parse.pm 1
                    144: 		    Text/Query/ParseAdvanced.pm 1
                    145: 		    Text/Query/ParseSimple.pm 1
                    146: 		    Text/Query/Simple.pm 1
                    147: 		    Text/Query/Solve.pm 1
                    148: 		    Text/Query/SolveAdvancedString.pm 1
                    149: 		    Text/Query/SolveSimpleString.pm 1
                    150: 		    URI.pm 1
                    151: 		    URI/Escape.pm 1
                    152: 		    URI/Heuristic.pm 1
                    153: 		    URI/URL.pm 1
                    154: 		    URI/WithBase.pm 1
                    155: 		    URI/_foreign.pm 1
                    156: 		    URI/_generic.pm 1
                    157: 		    URI/_login.pm 1
                    158: 		    URI/_query.pm 1
                    159: 		    URI/_segment.pm 1
                    160: 		    URI/_server.pm 1
                    161: 		    URI/_userpass.pm 1
                    162: 		    URI/data.pm 1
                    163: 		    URI/file.pm 1
                    164: 		    URI/file/Base.pm 1
                    165: 		    URI/file/FAT.pm 1
                    166: 		    URI/file/Mac.pm 1
                    167: 		    URI/file/OS2.pm 1
                    168: 		    URI/file/QNX.pm 1
                    169: 		    URI/file/Unix.pm 1
                    170: 		    URI/file/Win32.pm 1
                    171: 		    URI/ftp.pm 1
                    172: 		    URI/gopher.pm 1
                    173: 		    URI/http.pm 1
                    174: 		    URI/https.pm 1
                    175: 		    URI/ldap.pm 1
                    176: 		    URI/mailto.pm 1
                    177: 		    URI/news.pm 1
                    178: 		    URI/nntp.pm 1
                    179: 		    URI/pop.pm 1
                    180: 		    URI/rlogin.pm 1
                    181: 		    URI/rsync.pm 1
                    182: 		    URI/snews.pm 1
                    183: 		    URI/telnet.pm 1
                    184: 		    WWW/RobotRules.pm 1
                    185: 		    WWW/RobotRules/AnyDBM_File.pm 1
                    186: 		    Authen/Krb4.pm 1
                    187: 		    Bundle/DBD/mysql.pm 1
                    188: 		    Bundle/DBI.pm 1
                    189: 		    Crypt/DES.pm 1
                    190: 		    Crypt/IDEA.pm 1
                    191: 		    DBD/ADO.pm 1
                    192: 		    DBD/ExampleP.pm 1
                    193: 		    DBD/Multiplex.pm 1
                    194: 		    DBD/NullP.pm 1
                    195: 		    DBD/Proxy.pm 1
                    196: 		    DBD/Sponge.pm 1
                    197: 		    DBD/mysql.pm 1
                    198: 		    DBI.pm 1
                    199: 		    DBI/DBD.pm 1
                    200: 		    DBI/FAQ.pm 1
                    201: 		    DBI/Format.pm 1
                    202: 		    DBI/ProxyServer.pm 1
                    203: 		    DBI/Shell.pm 1
                    204: 		    DBI/W32ODBC.pm 1
                    205: 		    Digest.pm 1
                    206: 		    Digest/HMAC.pm 1
                    207: 		    Digest/HMAC_MD5.pm 1
                    208: 		    Digest/HMAC_SHA1.pm 1
                    209: 		    Digest/MD2.pm 1
                    210: 		    Digest/MD5.pm 1
                    211: 		    Digest/SHA1.pm 1
                    212: 		    HTML/Entities.pm 1
                    213: 		    HTML/Filter.pm 1
                    214: 		    HTML/HeadParser.pm 1
                    215: 		    HTML/LinkExtor.pm 1
                    216: 		    HTML/Parser.pm 1
                    217: 		    HTML/TokeParser.pm 1
                    218: 		    MIME/Base64.pm 1
                    219: 		    MIME/QuotedPrint.pm 1
                    220: 		    Math/Cephes.pm 1
                    221: 		    Math/Cephes/Complex.pm 1
                    222: 		    Math/Cephes/Fraction.pm 1
                    223: 		    Mysql.pm 1
                    224: 		    Mysql/Statement.pm 1
                    225: 		    SHA.pm 1
                    226: 		    Safe/Hole.pm 1
                    227: 		    Win32/DBIODBC.pm 1
                    228: 		    Algorithm/Diff.pm 1
                    229: 		    Apache/Constants.pm 1
                    230: 		    Apache/File.pm 1
                    231: 		    capa.pm 1
                    232: 		    CGI.pm 1
                    233: 		    CGI/Cookie.pm 1
                    234: 		    Crypt/DES.pm 1
                    235: 		    DBI.pm 1
                    236: 		    Fcntl.pm 1
                    237: 		    File/Copy.pm 1
                    238: 		    FileHandle.pm 1
                    239: 		    GDBM_File.pm 1
                    240: 		    HTML/TokeParser.pm 1
                    241: 		    HTML/TreeBuilder.pm 1
                    242: 		    HTTP/Headers.pm 1
                    243: 		    IO/Socket.pm 1
                    244: 		    LWP/UserAgent.pm 1
                    245: 		    Math/Cephes.pm 1
                    246: 		    Math/Random.pm 1
                    247: 		    Opcode.pm 1
                    248: 		    POSIX.pm 1
                    249: 		    Safe.pm 1
                    250: 		    Safe/Hole.pm 1
                    251: 		    Socket.pm 1
                    252: 		    strict.pm 1
                    253: 		    Text/Query.pm 1
                    254: 		    tth.pm 1
                    255: 		    vars.pm 1
                    256: 		    );
                    257: 
                    258: my $errorflag=0;
                    259: foreach my $dep (keys %dependencies) {
                    260:     unless ($modules=~/$dep/) {
                    261: 	print "MISSING $dep\n";
                    262: 	$errorflag++;
                    263:     }
                    264: }
                    265: 
1.2       harris41  266: unless ($errorflag) {
                    267:     print "All perl modules needed by LON-CAPA appear to be present.\n";
                    268: }
                    269: 
1.1       harris41  270: exit $errorflag;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>