For Programmers: Free Programming Magazines  


Home > Archive > PERL Programming > April 2006 > How do I find if a module is installed ?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How do I find if a module is installed ?
Aaron Gray

2006-04-10, 9:57 pm

Hi,

New to Perl. And want to know if "Pod::Simple" is installed on my RedHat 9
machine ?

How do I check if a module is installed and also how do I get a list of
installed modules ?

Many thanks in advance,

Aaron


John W. Krahn

2006-04-11, 3:58 am

Aaron Gray wrote:
>
> New to Perl. And want to know if "Pod::Simple" is installed on my RedHat 9
> machine ?
>
> How do I check if a module is installed and also how do I get a list of
> installed modules ?


perldoc -q "How do I find which modules are installed on my system"


John
--
use Perl;
program
fulfillment
Paul Lalli

2006-04-11, 7:59 am

Aaron Gray wrote:
> New to Perl. And want to know if "Pod::Simple" is installed on my RedHat 9
> machine ?


Run this at the command line:

perl -MPod::Simple -e1

If that gives you a "Cannot locate Pod/Simple.pm in @INC (@INC
contains....)" error, you don't have the module (or at least, don't
have it somewhere Perl knows about). If it gives you nothing at all,
you have it.

> How do I check if a module is installed and also how do I get a list of
> installed modules ?


perldoc perlmodlib
perldoc ExtUtils::Installed

Paul Lalli

Aaron Gray

2006-04-11, 9:57 pm


"Paul Lalli" <mritty@gmail.com> wrote in message
news:1144756063.683904.96790@u72g2000cwu.googlegroups.com...
> Aaron Gray wrote:
>
> Run this at the command line:
>
> perl -MPod::Simple -e1
>
> If that gives you a "Cannot locate Pod/Simple.pm in @INC (@INC
> contains....)" error, you don't have the module (or at least, don't
> have it somewhere Perl knows about). If it gives you nothing at all,
> you have it.


Okay that works :)

>
> perldoc perlmodlib


Pod/Perldoc/GetOptsOO.pm did not return a true value at
/usr/lib/perl5/5.8.0/Pod/Perldoc.pm line 28.
BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.0/Pod/Perldoc.pm
line 28.
Compilation failed in require at /usr/bin/perldoc line 8.
BEGIN failed--compilation aborted at /usr/bin/perldoc line 8.

My other systems giving :-

Can't locate Pod/Simple.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at
/usr/lib/perl5/5.8.0/Pod/Man.pm line 35.
BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.0/Pod/Man.pm line
35.
Compilation failed in require at /usr/bin/pod2man line 19.
BEGIN failed--compilation aborted at /usr/bin/pod2man line 19.
Got a 0-length file from /usr/lib/perl5/5.8.0/pod/perlmodlib.pod via
Pod::Perldoc::ToMan!?

> perldoc ExtUtils::Installed


Pod/Perldoc/GetOptsOO.pm did not return a true value at
/usr/lib/perl5/5.8.0/Pod/Perldoc.pm line 28.
BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.0/Pod/Perldoc.pm
line 28.
Compilation failed in require at /usr/bin/perldoc line 8.
BEGIN failed--compilation aborted at /usr/bin/perldoc line 8.

Again my other systems giving :-

Can't locate Pod/Simple.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at
/usr/lib/perl5/5.8.0/Pod/Man.pm line 35.
BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.0/Pod/Man.pm line
35.
Compilation failed in require at /usr/bin/pod2man line 19.
BEGIN failed--compilation aborted at /usr/bin/pod2man line 19.
Got a 0-length file from /usr/lib/perl5/5.8.0/ExtUtils/Installed.pm via
Pod::Perldoc::ToMan!?

'Can't locate Pod/Simple.pm' ??? I am .

Looks like I have a bad Perl instillation on both my RedHat 9 machines ???

Should Pod::Simple be installed on a base Perl instillation ?

Aaron


Joe Smith

2006-04-11, 9:57 pm

Aaron Gray wrote:

> 'Can't locate Pod/Simple.pm' ??? I am .
> Looks like I have a bad Perl instillation on both my RedHat 9 machines ???
> Should Pod::Simple be installed on a base Perl instillation ?


Pod::Simple is optional - it looks like /usr/bin/perldoc or Pod::Perldoc
may be requiring it in error. It's not needed on Fedora Linux.

> Pod/Perldoc/GetOptsOO.pm did not return a true value at
> /usr/lib/perl5/5.8.0/Pod/Perldoc.pm line 28.


That indicates a truncated file. It should have "1;" at the end.

fedora-fc4% tail -4 /usr/lib/perl5/5.8.*/Pod/Perldoc/GetOptsOO.pm
}

1;

-Joe
Paul Lalli

2006-04-11, 9:57 pm

Aaron Gray wrote:
> "Paul Lalli" <mritty@gmail.com> wrote in message
> news:1144756063.683904.96790@u72g2000cwu.googlegroups.com...
>
> Pod/Perldoc/GetOptsOO.pm did not return a true value at
> /usr/lib/perl5/5.8.0/Pod/Perldoc.pm line 28.
> BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.0/Pod/Perldoc.pm
> line 28.
> Compilation failed in require at /usr/bin/perldoc line 8.
> BEGIN failed--compilation aborted at /usr/bin/perldoc line 8.
>
> My other systems giving :-
>
> Can't locate Pod/Simple.pm in @INC (@INC contains:
> /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
> /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
> /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
> /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl
> /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at
> /usr/lib/perl5/5.8.0/Pod/Man.pm line 35.
> BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.0/Pod/Man.pm line
> 35.
> Compilation failed in require at /usr/bin/pod2man line 19.
> BEGIN failed--compilation aborted at /usr/bin/pod2man line 19.
> Got a 0-length file from /usr/lib/perl5/5.8.0/pod/perlmodlib.pod via
> Pod::Perldoc::ToMan!?
>
>
> Pod/Perldoc/GetOptsOO.pm did not return a true value at
> /usr/lib/perl5/5.8.0/Pod/Perldoc.pm line 28.
> BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.0/Pod/Perldoc.pm
> line 28.
> Compilation failed in require at /usr/bin/perldoc line 8.
> BEGIN failed--compilation aborted at /usr/bin/perldoc line 8.
>
> Again my other systems giving :-
>
> Can't locate Pod/Simple.pm in @INC (@INC contains:
> /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
> /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
> /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
> /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl
> /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at
> /usr/lib/perl5/5.8.0/Pod/Man.pm line 35.
> BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.0/Pod/Man.pm line
> 35.
> Compilation failed in require at /usr/bin/pod2man line 19.
> BEGIN failed--compilation aborted at /usr/bin/pod2man line 19.
> Got a 0-length file from /usr/lib/perl5/5.8.0/ExtUtils/Installed.pm via
> Pod::Perldoc::ToMan!?
>
> 'Can't locate Pod/Simple.pm' ??? I am .
>
> Looks like I have a bad Perl instillation on both my RedHat 9 machines ???


At the very least, the documentation part of the install seems FUBAR.

> Should Pod::Simple be installed on a base Perl instillation ?


It's not listed in my 5.6.1 copy of perlmodlib, so I'd say no. Again,
sounds like something's wrong with your documentation installation.

Until you or your symin get that fixed, you can always view the
relevant documentation on the web:

http://perldoc.perl.org/ExtUtils/Installed.html

You might also try simply
man perlmodlib
and see if that works any better for you...

Paul Lalli

Sharon and Allen Sutton

2006-04-28, 6:58 pm

When a Perl Module has been installed from CPAN, the install scripts will
append the name of the module to the local module list that can be viewed by
executing

perldoc perllocal

Try this one!

"Paul Lalli" <mritty@gmail.com> wrote in message
news:1144783561.129253.186840@u72g2000cwu.googlegroups.com...
> Aaron Gray wrote:
>
> At the very least, the documentation part of the install seems FUBAR.
>
>
> It's not listed in my 5.6.1 copy of perlmodlib, so I'd say no. Again,
> sounds like something's wrong with your documentation installation.
>
> Until you or your symin get that fixed, you can always view the
> relevant documentation on the web:
>
> http://perldoc.perl.org/ExtUtils/Installed.html
>
> You might also try simply
> man perlmodlib
> and see if that works any better for you...
>
> Paul Lalli
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com