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

Hi,

I have created a Perl script(which internally uses Inline::Java) to expose Java services.

The problem currently I am facing this setup is the following.

Whenever a user access this script, it is creating a _Inline/ directory under bin/ (and at multiple locations if the internal module is used in some other script). I see if the user has .Inline directory at his home location, it won't create this directory. But, in my case I can't ask all the users to create this directory at their home location.

Is there a way so that the _Inline directory creation can happen at one place always?

  • Comment on Inline::Java Usage: _Inline/ directory creation

Replies are listed 'Best First'.
Re: Inline::Java Usage: _Inline/ directory creation
by Corion (Patriarch) on May 14, 2012 at 08:21 UTC

    Please see Inline for the documentation on the Inline Directory. Also, searching for "_Inline" in Inline::Java yields the same information.

    As the module author is a frequent contributor here, maybe you can also tell us how the documentation of Inline could be restructured so that you would have found this information more readily.

      I have already used DIRECTORY option and this is also didn't stop the _Inline/ directory creation.
        I have already used DIRECTORY option and this is also didn't stop the _Inline/ directory creation

        That shouldn't happen. How did you specify the DIRECTORY option ?
        Either:
        use Inline Config => DIRECTORY => 'home/me/here'; or use Inline Java => Config => DIRECTORY => '/home/me/here';
        should have the desired effect - though I can't check properly as I don't have Inline::Java.

        Cheers,
        Rob
Re: Inline::Java Usage: _Inline/ directory creation
by marto (Cardinal) on May 14, 2012 at 08:25 UTC

    From the Inline::Java documentation:

    You can specify Inline::Java options by setting the proper environment variables, and you can also set the _Inline directory by using the PERL_INLINE_JAVA_DIRECTORY environment variable.

      I went through the FAQ and the following.

      In fact as long as you don't have ~/.Inline/ defined, Inline will create a new ./_Inline directory.

      As per above statement, it expects either .Inline or _Inline directory at home location. Otherwise, it will create _Inline/ directory.

        In fact as long as you don't have ~/.Inline/ defined, Inline will create a new ./_Inline directory

        That behaviour should *not* occur if DIRECTORY is specified. (And the documentation will be modified to make that clear.)

        If you've specified a DIRECTORY in the script and the _Inline directory is still being created then either you didn't specify DIRECTORY correctly, or there's a bug - and a simple script that demos the bug would be helpful.

        Cheers,
        Rob