New Perl installation can't find module

J

JONL

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
 
P

phaylon

JONL said:
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 ;)
 
J

J. Gleixner

JONL said:
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
 
C

Chris Mattern

JONL said:
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?"
 
J

Jeff Stampes

JONL said:
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
 
J

JONL

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/TermReadKey-2.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

J. Gleixner

JONL said:
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/TermReadKey-2.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/TermReadKey-2.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
 
C

Chris Mattern

JONL said:
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/TermReadKey-2.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?"
 
J

JONL

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 .
 
K

Keith Keller

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.

*Right above this* (which is exactly where J. Gleixner pointed you) is
the TermReadKey-2.30 that you should click to see a download link. It
says:

Jonathan Stowe > TermReadKey-2.30 > Term::ReadKey

Click the middle thing!
Still I am missing something .

You missed his advice (and the advice of others) to use CPAN to install
modules. If you use CPAN then you don't even need to download
TermReadKey manually, as CPAN will do it for you. I think it's been
posted, but if it hasn't, here's the CPAN documentation:

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

--keith
 
J

J. Gleixner

JONL said:
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 .

Hmmm.. The link at the top just after the author's name?.. It should
take you to:

http://search.cpan.org/~jstowe/TermReadKey-2.30/

That should do it.

I thought it'd be more informative to show how to get to the download
page, in case you want to do this with other modules.

See ya
 
J

JONL

JONL said:
I guess this thread has more than run its course. Though I will say
that the file I get from CPAN is ReadKey.pm which is less than what I
need since I need to compile an so file. Yes I did see the thing about
getting cpan to do the work for me and in fact was working last nite on
that . I got stopped when it demanded I load lynx which I started but
lynx had some problems with our curses configuration. These are
problems which can be resolved but will take time. I thank everyone
who offered advice.
JonL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,185
Latest member
GluceaReviews

Latest Threads

Top