C4::Circulation - ensure that certain modules always get imported
For some reason currently unclear to me, a use 'C4::XXX' does not seem to guarantee that the contents of C4::XXX's @EXPORT gets imported into C4::Circulation's symbol table. Added an INIT block to ensure that this gets done as part of runtime initialization. Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
8c60e82605
commit
2cb5a9e32e
|
|
@ -43,6 +43,22 @@ use C4::Log; # logaction
|
|||
|
||||
use Data::Dumper;
|
||||
|
||||
INIT {
|
||||
# an ugly hack to ensure that
|
||||
# various subs get imported
|
||||
# into C4::Circulation's symbol table
|
||||
# FIXME: hopefully can remove once
|
||||
# we get a better idea of exactly
|
||||
# how Exporter/use/require/import
|
||||
# should be used with modules
|
||||
# that currently call functions
|
||||
# from each other.
|
||||
import C4::Items;
|
||||
import C4::Members;
|
||||
import C4::Reserves;
|
||||
import C4::Overdues;
|
||||
}
|
||||
|
||||
our ($VERSION,@ISA,@EXPORT,@EXPORT_OK,%EXPORT_TAGS);
|
||||
|
||||
# set the version for version checking
|
||||
|
|
|
|||
Loading…
Reference in New Issue