kgd has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks,

I am totally new to Perl. Now, you are the ones who should help me fall in love with it. I need to quickly setup a perl environment and run a complicated piece of code written by someone else. One look at the code, and I gave up. Perl definitely doesn't present a pleasant face to a new comer. This code uses a lot of PDL, Inline, etc etc. I have installed all these modules from CPAN. There are a lot of custom modules as well. I am trying to run each perl file hoping to find out the dependencies and installing them. Now, I am struck with Inline. I have installed the Inline module.
When I run my code, Perl says that it doesn't understand C, even though I have installed gcc. In the config file in _Inline which it automatically generated, there is no entry for C. I manually put the entry, But I don't have C.pm in the proper place. I copied it from some folder called B/C.pm. Now it says, "Perhaps you forgot to load Inline::C". What shall I do?

update (broquaint): added formatting

Replies are listed 'Best First'.
Re: problems with Inline
by crenz (Priest) on Apr 07, 2003 at 10:39 UTC

    Have you checked out the CPAN module? It helps you to install modules more easily. Just try out

    perl -MCPAN -e shell

    Copying the library files manually definitely is a bad idea unless you really know what you are doing. Perl libraries can additionally consist of C extension files that are not inside the .pm file. For the module to work correctly, you would have to copy all these files in the correct place. It's better to let perl do this for you :)

      Thanks Crenz, I did use perl -MCPAN to install the Inline module. What I manually edited was the config file in the _Inline folder that was automatically generated by perl. Maybe I shouldn't have done that. But couldn't figure out how to make perl understand that Inline::C had to be used.
Re: problems with Inline
by zby (Vicar) on Apr 07, 2003 at 10:51 UTC
    The readme for Inline says: C installation is optional. Perhaps you did not install the Inline::C module only the Inline?
      like Crenz suggested, I installed the Inline module using perl -MCPAN -e shell but during the process, was never prompted to select or deselect C.
        As far as I remember it asks for it during the install - but the default answer is 'yes'.