Note that there are some explanatory texts on larger screens.

plurals
  1. POGetting Statistics::R to work with PerlApp (or PAR)
    text
    copied!<p>I'm trying to make an .exe from a simple perl script that uses the Statistics::R package.</p> <pre><code>use Statistics::R; use strict; my $R = Statistics::R-&gt;new(); $R-&gt;startR; $R-&gt;send('x=10'); $R-&gt;send('x'); my $ret = $R-&gt;read; print $ret; $R-&gt;stopR(); </code></pre> <p>Everything works fine until I create the perlapp .exe file. When I test this, I get the following errors:</p> <pre><code>Inappropriate I/O control operation: Win32::Process::Create() at /&lt;C:\@programming\r\trying_r_bridge.exe&gt;IPC/Run.pm line 2105 Inappropriate I/O control operation: Win32::Process::Create() at /&lt;C:\@programming\r\trying_r_bridge.exe&gt;IPC/Run.pm line 2224 Inappropriate I/O control operation: Win32::Process::Create() at /&lt;C:\@programming\r\trying_r_bridge.exe&gt;IPC/Run.pm line 2224 </code></pre> <p>I looked online and found this thread about the problem: <a href="http://www.nntp.perl.org/group/perl.par/2011/05/msg5022.html" rel="nofollow">http://www.nntp.perl.org/group/perl.par/2011/05/msg5022.html</a></p> <p>This is what they say:</p> <blockquote> <p>this happens because the IPC::Run module on Win32 (only) tries to run subprocesses using $^X, which normally contains the path to perl.exe. However, when PAR packs an executable, $^X doesn't happen to point to perl.exe, and so IPC::Run fails at that point. Implementing IPC::Run on Windows without using subprocesses is an unsolved problem.</p> </blockquote> <p>In the end, the thread solution is to use IPC::Run3, which is not an option here.</p> <p>Any suggestions for how to overcome this problem?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload