]> git.evergreen-ils.org Git - Evergreen.git/commit
Lp 1835620: Require some Storage submodules instead of use them
authorJason Stephenson <jason@sigio.com>
Sun, 7 Jul 2019 11:18:01 +0000 (07:18 -0400)
committerJason Boyer <jboyer@equinoxinitiative.org>
Wed, 23 Oct 2019 14:33:28 +0000 (10:33 -0400)
commitd3585056be4a06ba5c1fecc4b0807e34b5f7a241
tree6fbb1d01af90774c12a716ad8d74024abaad2a23
parent2a736f126a4a086ab5f294db928cb49a984d4c4a
Lp 1835620: Require some Storage submodules instead of use them

Switch from "use" to "require" for submodules in OpenILS::Application
::Storage::CDBI and OpenILS::Application::Storage::Driver::Pg.
Circular dependencies and other issues cause the following errors at
compile time for those modules:

Compilation failed in require at
/usr/local/share/perl/5.28.1/OpenILS/Application/Storage/CDBI.pm line
9.

Compilation failed in require at
/usr/local/share/perl/5.26.1/OpenILS/Application/Storage/Driver/Pg.pm
line 15.

Require loads the submodules at run time and does not attempt to
import any methods.  This is the behavior we want, eliminates the
above errors, and everything still works.

Add comments above the required modules explaining why require is
needed and not use.

Enable and reorder all of the tests in Open-ILS/src/perlmods/t/
09-OpenILS-Application-Storage-Driver.t.  Repairing the above issue
also repairs these tests.

Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Jason Boyer <jboyer@equinoxinitiative.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg.pm
Open-ILS/src/perlmods/t/09-OpenILS-Application-Storage-Driver.t