#!/usr/bin/perl # Change the line above to match the path to perl on your server ############################################################################### # This software is Copyright. ############################################################################### # © Webnet77.com 2003-2007 All rights reserved. ############################################################################### # INDEMNITY: # THIS SOFTWARE IS PROVEDED WITHOUT ANY WARRANTY WHATSOEVER. USE ENTIRELY AT YOUR # OWN RISK. NO LIABILITY WHATSOEVER, OF ANY NATURE, WILL BE ASSUMEND BY # Webnet77.com, IT'S DISTRIBUTORS, RESELLERS OR AGENTS. SHOULD THE SOFTWARE # DAMAGE YOUR SERVER, CAUSE YOU LOSS OR OTHER FINANCIAL DAMAGE, YOU AGREE YOU # HAVE NO CLAIM AGINST Webnet77.com IT'S DISTRIBUTORS, RESELLERS OR AGENTS. IF # YOU DO NOT ACCEPT THESE TERMS YOU MAY NOT USE THIS SOFTWARE. ############################################################################### # Author: B.R. Maurer. # Version 1.1.0 - Initial release April 2004 # Purpose of Software: List installed Perl Modules in a nice table. # Contact information: http://www.Webnet77.com ############################################################################### ############################################################################### # *****~~~~~INSTALLATION~~~~~***** # ############################################################################### # 1. Unzip the file. There is only 1 file you need. # - list-modules.pl (the program) # # 4. Upload list-modules.pl to your server in ASCII MODE. NOTE ASCII mode!!! # # 5. CHMOD the file to 755. # # 6. If you did it all right, you should be ready to go. # Point your browser to http://yoursite.com/cgi-bin/list-modules.pl ############################################################################### ############################################################################### # !!!!!!!!!!!!!DO NOT CHANGE ANYTHING BEYOND THIS LINE!!!!!!!!!!!!! ############################################################################### use CGI qw(:all); use strict; my @mods; #------------------------------------------------------------------------------- sub list_modules { my ($n, $msg, $i); eval "use File::Find;"; if ($@) { disp_html(qq|Sorry, File::Find is not installed on this server.|); } find(\&wanted, @INC); @mods = sort {lc($a) cmp lc($b)} @mods; $n = @mods; $msg = qq|
Found: $n Modules
\n|; $msg .= qq|\n|;
$i = 0;
foreach (@mods) {
$i++;
$msg .= qq| $_ \n|; if (($i == int(($n / 3) + 2 / 3)) or ($i == int((2 * $n / 3) + 2 / 3 ))) { $msg .= qq| | \n\n|; } } $msg .= " | \n
LIST PERL MODULES INSTALLED ON THIS SERVER |
|
|
Free from Webnet77.com
|; exit; } #------------------------------------------------------------------------------- print header(); list_modules;