-----Original Message-----
From: Chad Perrin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 05, 2006 1:11 PM
To: [email protected]
Subject: Re: an easy way to know if a module is installed or not


On Thu, Oct 05, 2006 at 12:34:18PM -0400, Johnson, Reginald (GTI) wrote:
> To piggy back off of this question... Is there a way to just list out
> the modules you have installed?

This works for me:

  #!/usr/bin/perl -l
  use strict;
  use warnings;

  use File::Find 'find';
  use File::Spec::Functions;

  find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1
  }, @INC;

(watch the line-wrap)


-- 
Thanks, that's just what I was looking for.
--------------------------------------------------------

If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Click here for important additional terms relating to this 
e-mail.     http://www.ml.com/email_terms/
--------------------------------------------------------

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to