1. Commenting out
our @ISA= qw(PGcore); in the file IO.pm does not cure the problem although it doesn't hurt and is good idea in any case.
2. The most reliable way to diagnose the problem is to place
use WeBWorK::PG::IO qw(fileFromPath); in Translator.pm
then about every sixth time you restart the server you get an immediate error:
"fileFromPath" is not exported by the WeBWorK::PG::IO module
3. If you use something like
use WeBWorK::PG::IO qw(AskSage fileFromPath);
you will get error messages about both imported functions -- the problem is clearly some interaction with Exporter.
I've used a wide variety of ways of calling Exporter in IO.pm without being able to cure this behavior. If you use the trick in 2 above you can very rapidly determine whether or not a fix has worked, but that's the most progress I've made.
The only reliable workaround I've found at the moment is to fully qualify the one place where fileFromPath is used in Translator.pm as suggested earlier by Davide.
line 544
my $macro_file_name = WeBWorK::PG::IO::fileFromPath($filePath);
It's definitely puzzling.
( see also the threads:
)