1

I am writing a trading program in perl with the newest Finance::InteractiveBrokers::TWS module. I kick off a command line interface in a separate thread at the beginning of my program but then when I try to create a tws object, my program exits with this message:

As of Inline v0.30, use of the Inline::Config module is no longer supported or
allowed. If Inline::Config exists on your system, it can be removed. See the
Inline documentation for information on how to configure Inline. (You should
find it much more straightforward than Inline::Config :-)

I have the newest versions of Inline and Inline::Java. I looked at TWS.pm and it doesn't seem to be using Inline::Config. I set 'SHARED_JVM => 1' in the 'use Inline()' and 'Inline->bind()' calls in TWS.pm but that did not resolve the issue...

My Code:

use Finance::InteractiveBrokers::TWS;
use threads;
use threads::shared;

our $callback;
our $tws;

my $interface = UserInterface->new();
share($interface);
my $t = threads->create(sub{$interface->runUI()});

$callback= TWScallback->new();
$tws = Finance::InteractiveBrokers::TWS->new($manager); #This is where the program fails

1 Answers1

1

So is Inline::Config installed on your system or not? A cursory inspection of the code is not sufficient to tell whether Perl is loading a module or not. There are too many esoteric ways (some intentional and some otherwise) to load a package or otherwise populate a namespace.

The error message in question comes from this line of code in Inline.pm:

croak M14_usage_Config() if %main::Inline::Config::;

so something in your program is populating the Inline::Config namespace. You should do what the program instructs you to do: find out where Inline/Config.pm is installed on your system (somewhere in your @INC path) and delete it.

mob
  • 117,087
  • 18
  • 149
  • 283