On Wed, May 25, 2005 at 10:33:58AM +0200, Wilhelm Pastoors/Denic wrote:
> Hallo;
> 
> the use of Inline-Java in our perl programs has a
> bad impact on performance.
> In about 1 percent of all cases the program needs the
> java-functionality, mostly Java is not needed.
> 
> I tried with "require Inline" instead of
> "use Inline", but this doesn't work out of the
> box.
> As a last resort I plan to separate the call
> of Inline-Java in an extra "java.pl"-file and
> to call this file via "system". 
> 
> Is there another, more elegant, solution for the 
> problem? 
>

Not sure how well this will fit into your program structure
and I have not confirmed these work with Inline::Java but you
could try


eval "use Inline::Java;";

which delays loading Inline::Java until the line is executed.
If you never need the java functionality then there should be
no overhead.

perldoc -f eval for the gory details


or 

require Inline::Java; import Inline::Java $your_argument_list; 

Inline::Java gets its configuration via the import method.
This is automatically called when you use a module.If you require
the module and call import yourself then this should be almost the
same as calling use.

> All hints are appreciated.
> 
> Sincerely
> 
> Wilhelm Pastoors
> 

-- 
We envision to synergistically network error-free materials for 100% customer 
satisfaction

Reply via email to