Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3FB3EEA6.10EB0BD5@dessent.net> Date: Thu, 13 Nov 2003 12:50:46 -0800 From: Brian Dessent Organization: My own little world... X-Accept-Language: en,en-US MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Perl CPAN module help References: <3FB3B2CB AT epostleser DOT online DOT no> <6jc7rv4palt1j9tpjomtfdg802udungc0t AT 4ax DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.linuxsv3.net X-AntiAbuse: Original Domain - cygwin.com X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - dessent.net Note-from-DJ: This may be spam zzapper wrote: > > Peter, > > >cpan > cpan> > > How do you list modules already installed? There's no definitive way to do this. If you just want to see if you have the Foo::Bar module, you can use "perl -MFoo::Bar -e 1" and if you get an error then you need to install Foo::Bar. You can also try the following script which uses the ExtUtils::Installed module, but I have found that its output is sometimes misleading, in that it will not display base (stock included) modules. And I'm not sure if it knows about modules that are installed through means other than CPAN (e.g. through your distro's package manager.) #!/usr/bin/perl use ExtUtils::Installed; my $instmod = ExtUtils::Installed->new(); foreach my $module ($instmod->modules()) { my $version = $instmod->version($module) || "???"; print "$module -- $version\n"; } Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/