Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
> Listing Perl Modules Installed, Finding out perl modules are installed
Corey
post Dec 19 2003, 12:50 AM
Post #1


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 1,254
Joined: 21-September 02
From: St John's, Newfoundland, Canada
Member No.: 3



Thanks to hughesjr for this tip:


Add this code to a file (I named it list_mods.pl)

QUOTE
#!/usr/bin/perl -w

use strict;
use CGI qw/:standard/;
use File::Find;

print header,
start_html,
h1("Perl Environment: $ENV{SERVER_NAME}"),
p("Perl Version: $]"),
p("CGI.pm Version: $CGI::VERSION"),
p("Library Path (\@INC):"),
ul(li([@INC])),
p('Modules:');

foreach my $dir (@INC) {
my @mods;
find(sub { push @mods, $File::Find::name if /\.pm$/ }, $dir);
print ul(li("$dir"), ul(li([sort @mods])));
}



Then run it like this:

perl list_mods.pl > list_mods.html

Open list_mods.html with your web browser...


--------------------
Corey Quilliam
(former) Linuxhelp.ca Administrator
cquilliam-AT-gmail-dot-com

Want to help out Linuxhelp.net? Check out our Linuxhelp Wiki and see if there are some articles you would like to submit!!

--
Ubuntu 8.04 64-bit - Work Laptop (HP-Compaq NC6400 Core2)
Kubuntu 8.04 64-bit - Desktop (HP m8120n QuadCore)
Ubuntu 6.04 - Server (I'm not upgrading this baby until support runs out in 2012) (Some old POS dell)
Go to the top of the page
 
+Quote Post

Posts in this topic
- Corey   Listing Perl Modules Installed   Dec 19 2003, 12:50 AM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th November 2017 - 12:29 PM