[prog] Finding your Perl modules
Jacinta Richardson
jarich at perltraining.com.au
Fri Jun 10 09:30:12 EST 2005
Dan wrote:
> Is there an "official" way to find all the Perl modules installed on
> your system? I've done this and it works pretty well:
> locate '*.pm'
> but I was wondering if there's some built-in mechanism to do it.
If you want to find out what Perl modules came along with perl you can write
perldoc perlmodlib (perl module library)
If you want to find out what Perl modules have been installed via the CPAN
module or perl Makefile.PL/make/make test/make install then you can write
perldoc perllocal (local libraries)
(incidently this may be what the webmin script uses mentioned by Marize).
If you want to find out which Perl modules have been installed via an operating
packaging system you have to ask it. This applies to all *nix machines
including BSDs and probably OSX. *nix packaging systems do not update the
perllocal information.
In addition, Perl modules installed by non-root users may not be identified by
perldoc perllocal even if installed via the CPAN module or perl
Makefile.PL/make/make test/make install. This is because (typically) only root
can update the perllocal information.
If you're using ActiveState Perl on MS Windows and you only ever add modules via
ActiveState's PPM manager then I believe that both ActiveState and perldoc
perllocal will let you know which modules are available.
I hope that helps,
Jacinta
--
("`-''-/").___..--''"`-._ | Jacinta Richardson |
`6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia |
(_Y_.)' ._ ) `._ `. ``-..-' | +61 3 9354 6001 |
_..`--'_..-_/ /--'_.' ,' | contact at perltraining.com.au |
(il),-'' (li),' ((!.-' | www.perltraining.com.au |
More information about the Programming
mailing list