The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Best Method for installing Perl Modules metallica1973 High Level Programming 2 03-05-2008 03:54 PM
Installing perl modules manually metallica1973 High Level Programming 0 03-05-2008 08:32 AM
Installing Perl Modules ssmiths001 Shell Programming and Scripting 1 06-26-2006 09:20 PM
How to check if perl is installed? kfad Shell Programming and Scripting 5 04-20-2005 09:12 PM
Calling perl modules from shell scritps kavitha Shell Programming and Scripting 1 03-31-2004 02:34 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-18-2007
jsandova's Avatar
jsandova jsandova is offline
Registered User
  
 

Join Date: May 2006
Location: Burbank Ca
Posts: 28
How to check for installed Perl modules on solaris?

Is there a quick way to check for installed perl modules on a solaris server? I found using perl -e "use Crypt:ES" will work for checking one package at a time. I was wondering if there was anything else out there?
  #2 (permalink)  
Old 10-18-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
If you have a perl script which attempts to use all the ones you want, shouldn't it fail gloriously, hence tell you bits are missing?
  #3 (permalink)  
Old 10-18-2007
jsandova's Avatar
jsandova jsandova is offline
Registered User
  
 

Join Date: May 2006
Location: Burbank Ca
Posts: 28
That is true however, I would prefer to have a quick way of listing what packages are already installed.
  #4 (permalink)  
Old 10-18-2007
jsandova's Avatar
jsandova jsandova is offline
Registered User
  
 

Join Date: May 2006
Location: Burbank Ca
Posts: 28
I found for what I was looking for. Posting it here in case someone else needs this.


for i in Crypt::CBC Crypt:ES DBI DBD::Oracle DBD::mysql ; do /usr/local/perl-5.8.3/bin/perl -e "eval { require $i; }; if (\$@) { print \"$i - not found\n\"; } else { print \"$i: \$$i::VERSION\n\"}" ; done
  #5 (permalink)  
Old 10-22-2007
yoder yoder is offline
Registered User
  
 

Join Date: Jun 2005
Posts: 8
This should work.

#!/usr/bin/perl
# list installed modules
use ExtUtils::Installed;
my $instmod = ExtUtils::Installed->new();
foreach my $module ($instmod->modules()) {
my $version = $instmod->version($module) || "???";
print "$module -- $version\n";
}
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:14 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0