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

Thanks to BikeNomad I was able to make progress in getting Inline.pm to run, but I could really use some more help.

perldoc Inline tells me that I can set the DIRECTORY variable so that Inline.pm can have a place to keep its scratch files. Assuming that I am user markj, I write:

Use Inline (Config => DIRECTORY => '/home/markj/.Inline/',);
at the top of my Perl script.

When I run my Perl script as user markj I get the following error message:

Failed to autogenerate /home/markj/.Inline/config

The interesting part is if I place a random file called config in .Inline then the error message tells me that my config file is from an older version of Inline. It advises me to remove it so that Inline can autogenerate a new config file for me. But in fact when I do what I am instructed the autogeneration fails.

My script runs as user markj who has the rights to create files in /home/markj/Inline.

Does anyone have any ideas about why I get the autogeneration fails error? I love Perl, but this Inline.pm on Perl 5.005 is driving me crazy.

Replies are listed 'Best First'.
Re: Failing to Autogenerate config in Inline.PM
by bikeNomad (Priest) on Jul 04, 2001 at 01:43 UTC
    Does it work if you don't specify a DIRECTORY (it should make an _Inline directory in the current directory)? One reason it may fail to generate is if it fails when calling an Inline::XX module's register() method. Notably, make sure you don't have Inline::Config installed on your machine (this is old and may cause trouble).
      No, Inline::Config is not installed, because when I try to use 'Inline::Config' I get an error message saying that the file could not be found in @INC.

      In answer to your helpful questions, if I do not specify any directory in my script then I then get the same error message as I did when I specified .Inline/. The error message says that it cannot autogenerate a config file in .Inline/. (.Inline/ is the default according to my reading of perldoc)

      If I remove the .Inline directory and I do not specify a directory then the error message says "Couldn't find an appropriate directory for Inline to use". Which is interesting, because I thought it would create such a directory for me, but it does not.

      Thanks for your help. Getting recalcitrant modules to run is a lot of work.

        Well, it works for me under 5.6.1 if I create the .Inline directory first. This may be a 5.005 problem. Can you run the following (with appropriate paths):

        use strict; use Inline (Config => DIRECTORY => '/home/ned/.Inline',); use Inline 'C'; greet('Ingy'); greet(42); __END__ __C__ void greet(char* name) { printf("Hello %s!\n", name); }

        On my system, it writes a config file in /home/ned/.Inline/config that looks like:

        version : 0.42 languages : % C : C Foo : Foo c : C foo : Foo types : % C : compiled Foo : interpreted modules : % C : Inline::C Foo : Inline::Foo suffixes : % C : so Foo : foo
Re: Failing to Autogenerate config in Inline.PM
by Sinister (Friar) on Jul 04, 2001 at 19:17 UTC
    You could always hack in a by-pass in the module itself...

    Sinister greetings.
    perldoc -q $_