Comment 0 for bug 1835620

Revision history for this message
Jason Stephenson (jstephenson) wrote :

Evergreen Version: master (all current releases affected)
OpenSRF Version: irrelevant
PosrgreSQL Version: irrelevant
Linux Distribution: All currently supported distributions, plus Debian Buster
Perl Versions: 5.20.2 (Debian Jessie), 5.22.1 (Ubuntu Xenial), 5.24.1 (Debian Stretch), 5.26.1 (Ubuntu Xenial), 5.28.1 (Debian Buster)

While testing Ben's branches for bug 1835458, I decided to check all of the Perl modules for errors. I ran the following commands to do this:

find /usr/local/share/perl/5.28.1/OpenSRF -name *.pm -exec perl -c {} \; >& opensrf.log
find /usr/local/share/perl/5.28.1/OpenILS -name *.pm -exec perl -c {} \; >& openils.log

Ignoring all of the "subroutine redefined" warnings caused by our circular references in both command outputs, the second command turned up the following errors:

Can't locate object method "has_a" via package "actor::user" (perhaps you forgot to load "actor::user"?) at /usr/local/share/perl/5.28.1/OpenILS/Application/Storage/CDBI.pm line 433.
Compilation failed in require at /usr/share/perl/5.28/base.pm line 135.
 ...propagated at /usr/share/perl/5.28/base.pm line 157.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.28.1/OpenILS/Application/Storage/CDBI/actor.pm line 6.
Compilation failed in require at /usr/local/share/perl/5.28.1/OpenILS/Application/Storage/CDBI.pm line 9.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.28.1/OpenILS/Application/Storage/CDBI.pm line 9.
Can't locate object method "register_method" via package "OpenILS::Application::Storage" at /usr/local/share/perl/5.28.1/OpenILS/Application/Storage/Driver/Pg/storage.pm line 19.
Compilation failed in require at /usr/local/share/perl/5.28.1/OpenILS/Application/Storage/Driver/Pg.pm line 15.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.28.1/OpenILS/Application/Storage/Driver/Pg.pm line 15.

I then ran the same two commands, modulo the Perl version, on all of the currently supported distributions: Ubuntu Xenial and Bionic, Debian Jessie and Stretch. They all turned up more or less the same errors.

These errors appear to happen mainly with perl -c. It seems like they should, but do not, prevent the open-ils.storage service frome starting.

Without getting into a lot of detail, it looks like we should "require" instead of "use" certain modules used by the two modules that have errors. I have already made a branch that does this, but I want to do more testing and to add Perl tests for the open-ils.storage module before sharing it.