----- Original Message ----- From: "Dana Jacobsen"
As you wrote, putting 'Inline->init()' after the inclusion of M::P::FS
solves the issue in both cases.  I can do this successfully:

if (eval {require Math::Prime::FastSieve; Inline->init(); 1;}) {
  # We have MPFS, do fast stuff.
} else {
  ...
}

The goal would be to have Inline handle it, or the module using Inline
(e.g. Math::Prime::FastSieve) do it.  But for now this works.

By the end of rhis week I'll have released Inline-0.50_02.
The documentation on how to write modules that use Inline will be revised to include the Inline->init() option for working around this problem.

In case an *early* call to Inline->init() might interfere with the initial compilation, I'll probably be recommending that it be done in and END{} block:

END {
 Inline->init();
}

That seems fine for me, and I don't think that will ever be too late a time to make the Inline->init() call. (If I'm ever proven wrong about that, then I can just re-write the docs again :-)

I don't really want to go altering Inline itself until I understand the purpose(s) this weird section of code serves. (And that might take a while ;-)

Thanks for raising this Dana, David.

Cheers,
Rob

Reply via email to