Does anyone know what may cause this error?
It happens very intermittently. I have run the script thousands of times in a loop unable to reproduce the problem, but I have seen it twice. This is line 1189:Can't locate object method "" via package "IO::File" at G:\path\to\mys +cript.pl line 1189
my $chunk = $th->join();
That line is in an "output" thread. It is using a file handle, and will write the data contained in $chunk (2D array reference) to a file using Text::CSV_XS. The thread it is joining is one of many "worker" threads which do not use file handles. The "input" thread which starts the worker threads does use a file handle and reads a different file using Text::CSV_XS. The "input" and "output" threads both require the Text::CSV_XS module (depending on arguments passed to script), so they will both load the module rather than inherit it from the parent thread.
Using Perl 5.18.2 on Windows. I have not seen it on Linux yet.
UPDATE: POTENTIAL SOLUTION BELOW
It happens on Windows or Linux.
In reply to Can't locate object method "" by chris212
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |