On Wed, Feb 13, 2008 at 9:10 PM, Rinkes, Dan <[EMAIL PROTECTED]> wrote:
>  I have a script that uses a module that uses Inline java.  I built the
>  executable with the command pp -M Findbin -M Inline -o foo.exe foo.pl.
>  However, when I run the .exe with the same parameters that I have
>  successfully run the perl script with, and from the same directory, I
>  get the following message.
>
>  An eval() failed in Inline::glue:
>
>  Can't locate Inline/Java/Portable.pm in @INC......(then it goes on to
>  display the @INC array)

OK, static analysis (i.e. Module::ScanDeps) didn't detect all necessary Perl
modules. Try option -x

$ pp -x -o foo.exe foo.pl

(note that this will actually run foo.pl once). That did indeed detect
the Perl stuff in Iinline/Java for me (and also FindBin). But when I ran foo.exe
Java can't find some jars that also came with Inline::Java. So I added
the whole subtree below Inline/Java to the exe with

$ pp -x  -a "c:\Programme\ActivePerl\site\lib\Inline\Java;lib/Inline/Java"
-o foo.exe foo.pl

That seemed to work, except it used the stuff in .\_Inline that Inline generated
behind your back. Of course, that won't work for your customers. Since this
is just a cache, Inline will try to regenerate this on the first run of foo.exe
(you'll see this if you just blow away .\_Inline). However,
that needs a development environment on the executing machine
(probably C compiler, nmake, JDK), so won't work for your customers either.
I tried to include the stuff in _Inline into the exe, ran into some glitch in
PAR::Packer, but finally wrestled pp to put it into the exe. It will
get extracted into $PAR_TEMP/inc, I even set $PERL_INLINE_DIRECTORY to
$PAR_TEMP/inc/_Inline  (in a BEGIN block *before* "use Inline::Java ..."),
but Inline still tried to regenerate the _Inline stuff on every
invocation of foo.exe.

Anyway, this problem isn't specific to Inline::Java, it hits any
Inline::* stuff.
If memory serves, this came up on the list before, but no real solution emerged.
You might want to search the list archives anyway.

Cheers, Roderich

Reply via email to