Search notes:

find-installed-perl-modules.pl

find-installed-perl-modules.pl is a quick and dirty script to find the location (path) of installed Perl modules on a computer.
#!/usr/bin/perl
use warnings;
use strict;
use File::Find;
use File::Spec;

if ($ENV{SCRIPT_NAME}) { # Cheap and dirty way to determine if running as cgi script
  print "Status: 200 OK\r\n";
  print "Content-type: text/plain\r\n";
  print "\r\n";
}

for my $inc (@INC) {
  print "$inc\n";
  find({
    preprocess => sub {
      sort @_;
    },
    wanted => sub {
      return unless -f;

      if ($File::Find::name =~ /(.*)\.pm$/) {
        my $module = File::Spec->abs2rel($1, $inc);
        $module =~ s![/\\]!::!g;

        print "  $module\n";
      }

    }
  }, $inc);
}
Github repository PerlModules, path: /_scripts_/find-installed-perl-modules.pl

See also

whichpm is a cross-platform script that locates installed Perl modules by their package name.
perldoc -l Module::Name

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758200744, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Perl/modules/_scripts_/find-installed-perl-modules(74): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78