----- Original Message -----
From: "Patrick LeBoutillier"
.
.
>
> I'm not sure if I'm following this thread properly, so this may not be
> relevant at all, but here goes:
>
> I don't think you can do that with an Inline::Java based module. Even
> if you have the complete build directory, you still need Inline::Java
> to make it run. The build phase of Inline::Java does not generate a
> standalone .so that is loaded at run time. It just generates some
> information file that are processed by Inline::Java at runtime.
>
Yes, you may not be following this thread properly - though I think you are
:-)
In any case what you have written sounds like it's *very* relevant.
For a bit of clarification (hopefully) here's one way of working the actual
hack that the op is attempting to use ..... except that it's Inline::C not
Inline::Java.
(I've checked that it works.)
1) Create Foo.pm, in the cwd:
---------------------------------------------
package Foo;
use Inline C => Config =>
CLEAN_AFTER_BUILD => 0;
use Inline C => <<'EOC';
void greet() {
printf("Hello from Foo\n");
}
EOC
1;
-------------------------------------------
Do something to make it compile. On my Win32 box I simply ran a one liner:
perl -MFoo -e "print \"done\""
Go into the ./_Inline/lib/auto folder and copy the 'Foo_ef0a' folder (or
whatever it happens to be called) into ./auto
Then create, in the cwd, Foo_ef0a.pm:
--------------------------------------------
package Foo_ef0a;
require DynaLoader;
@ISA = qw(DynaLoader);
bootstrap Foo_ef0a;
1;
---------------------------------------------
Then run (from the same directory) a test script (which I called 'try.pl'):
------------------------------
use Foo_ef0a;
Foo::greet();
print "DONE\n";
-----------------------------
And you get:
D:\pscrpt>perl try.pl
Hello from Foo
DONE
And that runs without any dependence upon Inline at all. Can the same be
done with Inline::Java ?
Cheers,
Rob