LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   perl modules problem (https://www.linuxquestions.org/questions/linux-software-2/perl-modules-problem-207498/)

jmg1894 07-20-2004 01:25 PM

perl modules problem
 
I am getting the following error message in perl. I think it's a problem with a module but I do not know which one or where to find it. Can anyone help!!

[root@jonesivr Mail-Sender-0.8.06]# perl -MModule::Name
Can't locate Module/Name.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-li
nux-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/pe
rl5/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 .).
BEGIN failed--compilation aborted.

Thanks

fibbi 07-20-2004 02:24 PM

yep, you need the Name.pm module. be root, and type the comand "cpan" (stands for comprehensive perl archive network). It should lead you through some configuration options to help you set up your mirrors and whatnot. When you're at the cpan command prompt type "install Name". It should automatically do it for you.


Just to note, slashes are translated into :: as far as perl modules are concerned. So if for some reason it actually is located in a "Module" folder, you'd type "install Module::Name".

Enjoy perl. It R0x0rs. ;)

jmg1894 07-20-2004 02:49 PM

This is what I get now when I try to install the name module


cpan> install Name
Warning: Cannot install Name, don't know what it is.
Try the command

i /Name/

to find objects with matching identifiers.


What am I missing or doing wrong?

wipe 07-20-2004 06:15 PM

Are you perhaps trying to actually use a module called Module::Name? As far as I know, that kind of thing doesn't exist. You might have read an example somewhere that presumes that you replace "Module::Name" with some (or any) modules real name. The same goes if you see somewhere a mention about Foo::Bar or similar phony names.

Modules are typically taken into use in the code itself (with a "use" statement), not on the command line.

Perl on-line documentation:
http://www.perldoc.com/

CPAN on the Web:
http://www.cpan.org/

I agree with fibbi, Perl is awesome, düde. :cool:

Regards
Simon

afm 07-21-2004 12:03 AM

Quote:

Originally posted by jmg1894
This is what I get now when I try to install the name module


cpan> install Name
Warning: Cannot install Name, don't know what it is.
Try the command

i /Name/

to find objects with matching identifiers.


What am I missing or doing wrong?

That's because there's no module called "Name" on the CPAN archives.

Since originally you wanted the "Module::Name" module, try then:

Code:

install Module::Name
If it still barks, the maybe Module::Name doesn't not exist in the world.


All times are GMT -5. The time now is 03:12 PM.