Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

modules installed by default?

by Anonymous Monk
on Sep 29, 2003 at 02:45 UTC ( [id://294853]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

How can I determine what modules are installed on a Perl installation? I was the newbie who asked about Hash::Util which is already installed by default in Perl 5.8. Yet, ActiveState's ppm utility doesn't report it when I issue a query * command.

Thanks again for being kind to a newbie.

Replies are listed 'Best First'.
Re: modules installed by default?
by chromatic (Archbishop) on Sep 29, 2003 at 03:46 UTC

    See perlmodlib, though this version is a little out of date. There should be a nice HTML version of it provided in ActiveState's documentation.

Re: modules installed by default?
by tachyon (Chancellor) on Sep 29, 2003 at 04:35 UTC

    You can view the HTML pod, probably at C:\Perl\html\index.html of all the ppm installed modules. If you have the docs here you have the module..... If you installed AS Perl elsewhere adjust the path as required.

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Re: modules installed by default?
by sgifford (Prior) on Sep 29, 2003 at 04:43 UTC
    Try to run perl -MModule::Name -e 1. If the module is installed, it will print nothing; otherwise it will print an error:
    [sgifford@sghome ucspi-tcp-0.88]$ perl -MFile::Copy -e 1 [sgifford@sghome ucspi-tcp-0.88]$ perl -MUninstalled::Module -e 1 Can't locate Uninstalled/Module.pm in @INC (@INC contains: /usr/lib/pe +rl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5. +6.1/i386-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_per +l/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site +_perl .). BEGIN failed--compilation aborted.
Re: modules installed by default?
by castaway (Parson) on Sep 29, 2003 at 10:53 UTC
    The CoreList module lists which modules are installed with which version of perl per default. (Though this won't include all the extras that ActiveState adds.)

    C.

Re: modules installed by default?
by selk (Beadle) on Sep 29, 2003 at 13:09 UTC

    Hi,

    If you enter this command:

    perldoc perllocal

    This will display what modules have been installed since Perl was installed on your system, hence shows you moduloes not part of the core install.

Re: modules installed by default?
by idsfa (Vicar) on Sep 29, 2003 at 14:28 UTC

    If you want a list of things not part of the core, this is a job for ExtUtils::Installed...

    perl -MExtUtils::Installed -e '$i=new ExtUtils::Installed; print join( +$/,$i->modules()),$/;'

    You can also use this module to list the contents of the core (or any other module).


    Remember, when you stare long into the abyss, you could have been home eating ice cream.
Re: modules installed by default?
by krisahoch (Deacon) on Sep 29, 2003 at 15:02 UTC
    When a module has been installed using ActiveState's ppm.bat file, then the documentation is updated as well. Just click on 'Start->Programs->ActiveState ActivePerl *.*->Documentation' and read in listing from there.
Re: modules installed by default?
by Lori713 (Pilgrim) on Sep 29, 2003 at 16:52 UTC
    I also use ActiveState on my Windows 2000 box. The following code generates a list of all modules on my PC (including paths). I noticed that there were a lot of modules installed under the "C:\Perl\site\lib" subdirectory that I never added myself, so assuming that "C:\Perl\lib" is the only place for defaults would be a mistake.

    I also have a Unix version of the code below. Both my versions print to the screen and to a file (as a newbie, I kinda like seeing it "do" something so I know it's working!). ;-)

    #!/usr/bin/perl5 -w #finds all .pm modules on a PC use strict; use File::Find; my $report = "C:\\Temp\\results.txt"; open MYOUTPUT, "> $report" or die "Can't open $report: $!"; my @directories = ("C:\\Perl"); my @foundfiles; # Collect all .pm files below each directory in @directories # and put them into @foundfiles find ( sub { push @foundfiles, $File::Find::name if /\.pm$/ }, @directories); #and print them to my file "results.txt" print "$_\n" for @foundfiles; print MYOUTPUT "$_\n" for @foundfiles; close MYOUTPUT;
    Hope that helps.

    Lori

Re: modules installed by default?
by Hagbone (Monk) on Sep 29, 2003 at 22:40 UTC
    I use a script called Perl Diver that I grabbed years ago.

    It can be downloaded at:

    http://www.scriptsolutions.com/programs/free/perldiver/

    It gives quite a bit of info regarding your system beyond just module info.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://294853]
Approved by jdtoronto
Front-paged by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2024-04-19 17:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found