On Tue, May 15, 2012 at 1:39 AM, Sisyphus <sisyph...@optusnet.com.au> wrote: > 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/";
I saw that thread and was sort of interested in seeing how it turned out. I figured it might make its way back to this list. One thought: Shouldn't it be: Config => DIRECTORY => "u/narlab/InlineLib"; I mean I don't see where the code specifies this is a config option, but maybe that's not necessary. Inline::CPP handles all of the configuration directives it feels it needs to, and propagates back to Inline::C those it feels it doesn't need to handle differently from Inline::C. Here is how that's done: # Filter out the parameters we treat differently than Inline::C, # forwarding unknown requests back up to Inline::C. my @propagate = _handle_config_options( $o, @config_options ); $o->SUPER::validate(@propagate) if @propagate; I understand Inline::Java is a different beast, and can't reasonably assume that configuration options that it doesn't handle could be handled by a super-class. I see that in Inline::Java's 'validate' function it specifically enumerates those options it understands. DIRECTORY isn't one of them. Its code is supposed to croak if it finds a parameter that it doesn't specifically enumerate. It would be interesting to run that snippet you posted with the DEBUG mode of Inline::Java set, and watch the output. It might be that 'validate' isn't seeing DIRECTORIES the way it's being set in the snippet you provided. I'm away from my development systems today, and don't have Inline::Java installed anyway (and if I did, wouldn't know what to do with it since I don't know the first thing about Java). But perhaps someone who is qualified could test that snippet under DEBUG mode, and try to trace out whether validate() is even seeing DIRECTORY. -- David Oswald daosw...@gmail.com