develooper Front page | perl.inline | Postings from May 2012

Inline::Java and DIRECTORY config option

Thread Next
From:
Sisyphus
Date:
May 15, 2012 01:40
Subject:
Inline::Java and DIRECTORY config option
Message ID:
9155BFF689714C02A6794B0C4A02FBB4@desktop2
Hi  all,
There's a thread on perlmonks
( http://www.perlmonks.org/index.pl?node_id=970385 ) in which it's claimed 
that the following code silently ignores the DIRECTORY specification, and 
(creates and) uses the ./_Inline directory:

#################################
use warnings;
use Inline Java => "STUDY",
           STUDY => [],
           AUTOSTUDY => 1,
           STARTUP_DELAY => 40,
           PORT => 14567,
           JNI => 1,
           EXTRA_JAVA_ARGS => '-Xmx800m',
           DIRECTORY => "/u/narlab/InlineLib/";

use Inline::Java qw(study_classes
                    cast
                    caught);

use Inline Java =>  <<'EOJ';

 public class Test {
     public static void init() {
        System.out.println("test");
    }
 }
EOJ

    my $t = Test->new();
    $t->init();

#################################

I assume the claim is correct (I have no reason to doubt it), but I can't 
actually verify it for myself as I no longer have a working Inline::Java 
installation.

Is it right that DIRECTORY gets silently ignored like that ?
If that's a misuse of the DIRECTORY option, should there at least be a 
warning ? (My immediate thoughts are that it should be a fatal error if 
DIRECTORY is being misused.)

I'm assuming that this is the sole responsibility of Inline::Java, but 
please let me know if Inline itself is in some way at fault, or could do 
something that would improve the situation.

Cheers,
Rob 


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About