Be sure to check out all of the responses from the Installed Module thread (there were several methods listed) from a couple days ago. | [reply] |
use HTML::Perlinfo;
perlinfo(INFO_MODULES);
That will show you all the modules on your system, their version number, their location, and whether or not they are core modules. It will also provide you with a link to the module documentation on CPAN. | [reply] [d/l] |
This module is a joke, right?
| [reply] |
The author (jacques) doesn't think so , judge for
yourself
# This is the list for 5.8.3.
perl_info_print_table_row(2, "AnyDBM_File","The Perl5 Porters Mailing List");
perl_info_print_table_row(2, "Attribute::Handlers","Arthur Bergman");
perl_info_print_table_row(2, "AutoLoader","The Perl5 Porters Mailing List");
perl_info_print_table_row(2, "AutoSplit","The Perl5 Porters Mailing List");
perl_info_print_table_row(2, "B","Malcolm Beattie");
perl_info_print_table_row(2, "B::Asmdata","Nicholas Clark");
perl_info_print_table_row(2, "B::Assembler","Nicholas Clark");
perl_info_print_table_row(2, "B::Bblock","Nicholas Clark");
perl_info_print_table_row(2, "B::Bytecode","Nicholas Clark");
perl_info_print_table_row(2, "B::C","Nicholas Clark");
perl_info_print_table_row(2, "B::CC","Nicholas Clark");
perl_info_print_table_row(2, "B::Concise","Nicholas Clark");
perl_info_print_table_row(2, "B::Debug","Nicholas Clark");
perl_info_print_table_row(2, "B::Deparse","Nicholas Clark");
perl_info_print_table_row(2, "B::Disassembler","Nicholas Clark");
perl_info_print_table_row(2, "B::Lint","Nicholas Clark");
perl_info_print_table_row(2, "B::Showlex","Nicholas Clark");
perl_info_print_table_row(2, "B::Stackobj","Nicholas Clark");
perl_info_print_table_row(2, "B::Stash","Nicholas Clark");
perl_info_print_table_row(2, "B::Terse","Nicholas Clark");
perl_info_print_table_row(2, "B::Xref","Nicholas Clark");
perl_info_print_table_row(2, "Benchmark","The Perl5 Porters Mailing List");
perl_info_print_table_row(2, "ByteLoader","Nicholas Clark");
perl_info_print_table_row(2, "CGI","Lincoln D. Stein");
perl_info_print_table_row(2, "CGI::Carp","The CGI-Perl Developers mailing list");
perl_info_print_table_row(2, "CGI::Cookie","Lincoln D. Stein");
perl_info_print_table_row(2, "CGI::Fast","Lincoln D. Stein");
Looks like a joke to me. | [reply] |
Well, you could filter the files in the subdirectories in @INC with the extension .pm...
use File::Find;
foreach my $dir (@INC) {
find( sub {
if (-f $_ and /\.pm/) {
my $module = $File::Find::name;
$module =~ s|\Q$dir\E/||; # remove part of @INC
$module =~ s|\.pm$||; # remove extension .pm
$module =~ s|/|::|g; # translate / to ::
print "$module\n";
} # if
}, $dir);
} # foreach
Best regards,
perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"
| [reply] [d/l] |
In similar vein, I've found this little program surprisingly useful:
[~]$ cat `which pmwhich`
#!/usr/bin/perl
use warnings;
use strict;
die "pmwhich module-name\n" unless @ARGV == 1;
my $module = $ARGV[0];
$module =~ s!::!/!g;
for my $dir (@INC) {
my $fqn = "$dir/$module.pm";
if (-e $fqn) {
print $fqn, "\n";
last;
}
}
[~]$ pmwhich bigint
/usr/lib/perl5/5.8.5/bigint.pm
[~]$
It's a quick way to find out whether a particular module is installed -- and it helps me learn the tricks other module-writers have used. Shoulders of giants, y'know?
Markus
| [reply] [d/l] |
The language is called Perl, the interpreter is perl. Both are not PERL. Perl is not an acronym. See perlfaq1. | [reply] |