## Installation

### IO.pm error -- was New server install: which versions to use?

by Michael Gage -
Number of replies: 1
I have spent some time trying to track down the error -- usually appearing as "fileFromPath not found", or "fileFromPath not exported" which occurs when using ubuntu 14.04 and specifically when using perl 5.18.0.   I haven't solved it but I've established some facts.

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
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.

)

### Re: IO.pm error -- was New server install: which versions to use?

by Michael Gage -

This error shows up, but not consistently if the operating system is upgraded to use perl 5.16 or higher.  (The new perl has an asynchronous loading pattern which is not allowed for in the original code.)  The pull requests webwork2: #465 and pg #148 address this issue.  Both pull requests need to be applied to the develop branch at the same time since files are changed in both the webwork2 and pg directories.

After further testing these pull requests will become part of the develop release.