in reply to Can't locate object method ""

I believe there is probably an entry in @CARP_NOT that is reporting a wrong line for the actual error. Can you post the code the thread is running? Usually this type of error means you are using a variable containing an empty string as a method name, e.g.
my $method; $obj->$method();

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Replies are listed 'Best First'.
Re^2: Can't locate object method ""
by chris212 (Scribe) on Dec 05, 2016 at 18:09 UTC
    I am not using anything like that in my code. "->$" does not appear anywhere in the script. I don't think I can share the actual code, but I will check. Usually I recreate an error with some simple code I can share, but I can't recreate the error since it is very intermittent.
      The interpreter is trying to find the method in IO::File, which means a line that has your file handle on it. I've seen a similar error when perl incorrectly interprets a line as using inverted invocation(e.g. my $fh = new File::IO;), but I can't seem to generate a 'functional' example at the moment.

      #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

        There are only two file handles used in the code. One in the input thread, and one in the output thread (the one that "terminated abnormally"). Both are declared with "my" in the thread's subroutine. Based on the arguments used when the crash happened, the only lines that use the file handle in the output thread are:

        my $fh; open($fh,'>',$output) or fail("Failed to read $output",$!); binmode($fh); my $csv; $csv = Text::CSV_XS->new ({ binary => 1, eol => $outputeol, sep_char = +> $outputdelim, quote_char => $outputenc, escape_char => $outputesc } +) or fail("Failed to create output CSV object",Text::CSV->error_diag +()); while(1) { my $th = $q->dequeue; last unless(defined $th); my $chunk = $th->join(); foreach my $outputs(@$chunk) { $csv->print($fh,$outputs); } } close($fh);