#!/usr/bin/perl -w use CGI::Carp qw(fatalsToBrowser); use CGI qw(:standard :cgi-lib); use strict; my @modules = qw( LWP::UserAgent My::Module Crypt::Blowfish Apache::Se +ssion::MySQL CGI CGI::Carp ); my ($_content, $mod); foreach $mod (@modules) { $_content .= qq~Checking "$mod"... ~; eval("use $mod"); if ($@) { $_content .= qq~$mod is NOT installed.~; $_content .= br() x 2; } else { $_content .= qq~$mod is installed.~; $_content .= br() x 2; } } print header(), start_html(-title=>"System Test"), $_content, end_html();
In reply to Re^2: module test
by Anonymous Monk
in thread module test
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |