On Tue, 11 Dec 2001 11:46:50 -0700, [EMAIL PROTECTED] (Patrick
Griffin) wrote:

>Hi,
>I'm guessing this has been asked before, but is there a way to tell which
>modules you have installed?  My system guys are picky about new ones, so
>I would like to know what we already have...

Here is a script I got off this list awhile back., runs from the
commandline too.
##############################################################
#!/usr/bin/perl -l
# modlist -- list Perl modules
    
# web check
print "Content-type: text/plain\n\n" if $ENV{REMOTE_ADDR};

use File::Find;
@path{@INC} = ();
for $base (@INC) {
  print "$base";
  find(\&modules, $base);
  print "";
}
   
sub modules {
  $File::Find::prune = 1, return if
    exists $path{$File::Find::dir} and $File::Find::dir ne $base;  
  my $module = substr $File::Find::name, length $base;
  return unless $module =~ s/\.pm$//;
  $module =~ s!^/+!!;
  $module =~ s!/!::!g;
  print "  $module";
}


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to