in reply to Re^2: Buggy CPAN Module (Statistics::R)
in thread Buggy CPAN Module (Statistics::R)

I am able to 'repair' the bug by adding sleep statements in three places in pipe.pm, as follows: IN Statistics::R::Bridge::pipe::send:
my $file = "$this->{LOG_DIR}/input.$n.r" ; sleep(2); while( -e $file || -e "$file._" ) {
AGAIN IN Statistics::R::Bridge::pipe::send
my ($x,$xx) ; sleep(2); while( (!$has_quit || $this->{STOPING} == 1) && -e $file && $this- +>is_started( !$this->{STOPING} ) ) { ++$x ;
IN Statistics::R::Bridge::pipe::read_processR
my ($n) = ( $data =~ /(\d+)\s*$/gi ); $n = 1 if $n eq '' ; sleep(1); return( $n , $data ) if wantarray ;
By doing this, I was able to get through 500 Fisher's test iterations on a UNIX server with no failed tests.
However, it is very slow because 5secs of artificial delay have been incorporated into each $R->send()!

My hypothesised reason for this is that the adjustment prevents process.log and the input.x.r files in the log_dir from getting out of sync with $n and $data.

The total time taken for 500 (successful) Fisher's tests with this alteration was: 358.38u 41.23s 1:23:39.62 7.9%