New Perl installation can't find module

Discussion in 'Perl Misc' started by JONL, Apr 11, 2005.

  1. JONL

    JONL Guest

    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
    JONL, Apr 11, 2005
    #1
    1. Advertising

  2. JONL

    phaylon Guest

    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
    phaylon, Apr 11, 2005
    #2
    1. Advertising

  3. JONL

    J. Gleixner Guest

    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
    J. Gleixner, Apr 11, 2005
    #3
  4. 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?"
    Chris Mattern, Apr 11, 2005
    #4
  5. JONL

    Jeff Stampes Guest

    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
    Jeff Stampes, Apr 11, 2005
    #5
  6. JONL

    JONL Guest

    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 .
    JONL, Apr 11, 2005
    #6
  7. JONL

    J. Gleixner Guest

    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/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
    J. Gleixner, Apr 11, 2005
    #7
  8. 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/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?"
    Chris Mattern, Apr 11, 2005
    #8
  9. JONL <> 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
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Apr 11, 2005
    #9
  10. JONL

    JONL Guest

    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 .
    JONL, Apr 11, 2005
    #10
  11. JONL

    Keith Keller Guest

    On 2005-04-11, JONL <> wrote:
    >
    > 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

    --
    -francisco.ca.us
    (try just my userid to email me)
    AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom
    see X- headers for PGP signature information
    Keith Keller, Apr 11, 2005
    #11
  12. JONL

    J. Gleixner Guest

    JONL wrote:
    > 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. Gleixner, Apr 11, 2005
    #12
  13. JONL

    JONL Guest

    JONL wrote:
    >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
    JONL, Apr 12, 2005
    #13
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mistletoe

    Installation of a perl module

    mistletoe, Nov 12, 2003, in forum: Perl Misc
    Replies:
    5
    Views:
    310
    Helgi Briem
    Nov 13, 2003
  2. HarishN
    Replies:
    4
    Views:
    229
    Anno Siegel
    Feb 23, 2004
  3. Replies:
    0
    Views:
    106
  4. Pioneer

    DB Module installation issue in Perl

    Pioneer, Apr 22, 2007, in forum: Perl Misc
    Replies:
    0
    Views:
    199
    Pioneer
    Apr 22, 2007
  5. Replies:
    1
    Views:
    88
Loading...

Share This Page