Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   New Perl installation can't find module (http://www.velocityreviews.com/forums/t891746-new-perl-installation-cant-find-module.html)

JONL 04-11-2005 06:10 PM

New Perl installation can't find module
 
Hi,
Please excuse me if this is an ignorant question. I have been slowly
backing my self up into the care and feeding of our perl subsystem.
I having been trying to get our new Perl (5.8.0) load to recognize the
ReadKey.pm module. What I did was to go to a directory in the @INC
array and add the file Term/ReadKey.pm. But still when I run the
program which has the statement use Term/ReadKey it comes back with
Can't locate loadable object for module Term::ReadKey in @INC
it then list the directories in INC, one of which is the directory
holding Term/ReadKey.pm

I have been pouring over man pages for PerlMod and PerlModLib and
thought I had it right but apparently I am missing something. Can
someone give me a clu? Thanks in advance
JonL


phaylon 04-11-2005 06:13 PM

Re: New Perl installation can't find module
 
JONL wrote:

> Can someone give me a clu?


Hm. Would you mind giving us a bit more information? Like code, *exact*
(copy&paste) path's of the files and version information of perl would
help I guess.

You know, not all of us are wizzards ;)

--
http://www.dunkelheit.at/

Ordinary morality is only for ordinary people.
-- Aleister Crowley


J. Gleixner 04-11-2005 06:32 PM

Re: New Perl installation can't find module
 
JONL wrote:
> Hi,
> Please excuse me if this is an ignorant question. I have been slowly
> backing my self up into the care and feeding of our perl subsystem.
> I having been trying to get our new Perl (5.8.0) load to recognize the
> ReadKey.pm module. What I did was to go to a directory in the @INC
> array and add the file Term/ReadKey.pm. But still when I run the
> program which has the statement use Term/ReadKey it comes back with
> Can't locate loadable object for module Term::ReadKey in @INC
> it then list the directories in INC, one of which is the directory
> holding Term/ReadKey.pm
>
> I have been pouring over man pages for PerlMod and PerlModLib and
> thought I had it right but apparently I am missing something. Can
> someone give me a clu? Thanks in advance
> JonL
>


Copying ReadKey.pm isn't enough. Install it the "correct" way:

perl Makefile.PL
make
make test
make install

Chris Mattern 04-11-2005 06:34 PM

Re: New Perl installation can't find module
 
JONL wrote:

> Hi,
> Please excuse me if this is an ignorant question. I have been slowly
> backing my self up into the care and feeding of our perl subsystem.
> I having been trying to get our new Perl (5.8.0) load to recognize the
> ReadKey.pm module. What I did was to go to a directory in the @INC
> array and add the file Term/ReadKey.pm. But still when I run the
> program which has the statement use Term/ReadKey it comes back with
> Can't locate loadable object for module Term::ReadKey in @INC
> it then list the directories in INC, one of which is the directory
> holding Term/ReadKey.pm


ReadKey has C code that must be compiled. Use CPAN to install it.
>
> I have been pouring over man pages for PerlMod and PerlModLib and
> thought I had it right but apparently I am missing something. Can
> someone give me a clu? Thanks in advance
> JonL


--
Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"

Jeff Stampes 04-11-2005 06:44 PM

Re: New Perl installation can't find module
 
JONL wrote:
> What I did was to go to a directory in the @INC
> array and add the file Term/ReadKey.pm. But still when I run the
> program which has the statement use Term/ReadKey it comes back with
> Can't locate loadable object for module Term::ReadKey in @INC
> it then list the directories in INC, one of which is the directory
> holding Term/ReadKey.pm


(my terminology may be incorrect here, but I'm sure someone will correct me)

ReadKey is an XS module. The .pm file is simply a wrapper around a
compiled C module, ReadKey.so:

stampes@flux[41] lib > find . -name ReadKey.*
../site_perl/i686-linux-thread-multi/auto/Term/ReadKey/ReadKey.so
../site_perl/i686-linux-thread-multi/auto/Term/ReadKey/ReadKey.bs
../site_perl/i686-linux-thread-multi/Term/ReadKey.pm

Additionally, you need to be concerned about whether ReadKey is
autosplit or not.

Copying files around is a dangerous way to install modules. Use cpan,
or download the sources and recompile modules yourself for safety

~Jeff

JONL 04-11-2005 08:25 PM

Re: New Perl installation can't find module
 
Ok,
So I see I should have compiled it. I had run this route before but I
come up with so many obstacles. Remember I am new to this. I have been
pouring through the local man pages and through the internet. So this
takes me to my next ignorant question. I go to perl.org --> get perl
--> modules and extensions. I then search CPAN for ReadKey.pm and
follow the hyperlink for "source" code
-- http://search.cpan.org/~kjalb/TermRe....14/ReadKey.pm --
Frankly I was expecting a tar.gz file But I get a file which looks
like a lot of comments eventually coming up to some readable perl .
This, in fact, looks just like the ReadKey.pm that I had moved to the
area. So if there is a module that can be compiled I am not sure where
to go for it .


J. Gleixner 04-11-2005 08:35 PM

Re: New Perl installation can't find module
 
JONL wrote:
> Ok,
> So I see I should have compiled it. I had run this route before but I
> come up with so many obstacles. Remember I am new to this. I have been
> pouring through the local man pages and through the internet. So this
> takes me to my next ignorant question. I go to perl.org --> get perl
> --> modules and extensions. I then search CPAN for ReadKey.pm and
> follow the hyperlink for "source" code
> -- http://search.cpan.org/~kjalb/TermRe....14/ReadKey.pm --
> Frankly I was expecting a tar.gz file But I get a file which looks
> like a lot of comments eventually coming up to some readable perl .
> This, in fact, looks just like the ReadKey.pm that I had moved to the
> area. So if there is a module that can be compiled I am not sure where
> to go for it .
>


On this page:
http://search.cpan.org/~jstowe/TermR....30/ReadKey.pm

select the 'TermReadKey-2.30' link at the top. From the page that
follows it, you'll see a 'download' link near the top of the page.

You may want to look at the CPAN module, which will go out and fetch,
compile, install modules for you:

http://search.cpan.org/~andk/CPAN-1.76/lib/CPAN.pm

Chris Mattern 04-11-2005 08:37 PM

Re: New Perl installation can't find module
 
JONL wrote:

> Ok,
> So I see I should have compiled it. I had run this route before but I
> come up with so many obstacles. Remember I am new to this. I have been
> pouring through the local man pages and through the internet. So this
> takes me to my next ignorant question. I go to perl.org --> get perl
> --> modules and extensions. I then search CPAN for ReadKey.pm and
> follow the hyperlink for "source" code
> -- http://search.cpan.org/~kjalb/TermRe....14/ReadKey.pm --
> Frankly I was expecting a tar.gz file But I get a file which looks
> like a lot of comments eventually coming up to some readable perl .
> This, in fact, looks just like the ReadKey.pm that I had moved to the
> area. So if there is a module that can be compiled I am not sure where
> to go for it .


Use CPAN. CPAN will download everything you need, build it, and put it
where it belongs.

--
Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"

Tad McClellan 04-11-2005 09:00 PM

Re: New Perl installation can't find module
 
JONL <jon.m.landenburger@verizon.com> wrote:

> program which has the statement use Term/ReadKey

^^^

Do you mean a program which has the statement use Term::ReadKey?


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

JONL 04-11-2005 09:19 PM

Re: New Perl installation can't find module
 
J. G

When I go to the URL you provided-- which is the same one I went to in
the description above I do click on the TermReadKey-2.30 I get a page
with Module Version 2.30 SOURCE.
Followed by Name, Synopsis Discription , Author, I scroll that whole
thing and dont find a download.
Now if I click on Source I get a download dialog which will download
ReadKey.pm which I alreay have. Either I am downloading the wrong thing
r I need to know how to create the so files from that .pm file. Still
I am missing something .



All times are GMT. The time now is 12:25 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.