# this script is started by the shell script checkSystem use strict; use Tk; my @modules = qw( Benchmark Cwd Tk File::Basename File::Copy File::Find File::Move Tk::Balloon Tk::Dialog Tk::Dirlist Tk::Font Tk::ROText Tk::ProgressBar Tk::FontDialog Tk::After Tk::Notebook ); my @optModules = qw( Tk::ColourChooser Tk::FontDialog Tk::Animation File::MMagic Benchmark ); print "\n------------------------------------------------------------------\n"; print "\nVersions:\n"; print "Perl version: $] (5.005 or better is needed)\n"; print "Perl/Tk version: $Tk::VERSION (800.015 or better is needed)\n"; print "Tcl/Tk-Version: $Tk::version (8.0 or better is needed)\n"; print "\n------------------------------------------------------------------\n"; print "\nSearching modules in \@INC:\n"; foreach (@INC) { print "$_\n"; } print "\n------------------------------------------------------------------\n"; print "modules needed:\n\n"; foreach (sort @modules) { if (!eval "require $_") { printf "%-18s is not available! Go to http://www.cpan.org\n", $_; } else { printf "%-18s is available!\n", $_; } } print "\n------------------------------------------------------------------\n"; print "Optional modules:\n\n"; foreach (sort @optModules) { if (!eval "require $_") { printf "%-18s not found! You will find it at http://search.cpan.org\n", $_; } else { printf "%-18s found. Excellent!\n", $_; } } print "\n------------------------------------------------------------------\n"; print "\n";