http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10639 Bug ID: 10639 Summary: Circular dependencies cause inventory.pl to fail when returning items Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Currently, when you're running an inventory, inventory.pl will die if any of the items need to be returned (i.e. Koha says they're checked out, but they were found on the shelf, so we do an "AddReturn"). After chatting to Chris Cormack and Jared Camins-Esakov on IRC, it appears the cause is due to "circular dependencies". That is, C4::Circulation::AddReturn is failing, because Perl thinks certain subs used in AddReturn from C4::Items actually belong to C4::Circulation (or rather it's just plain confused about where they're supposed to come from). This is because C4::Items and C4::Circulation depend on each other. C4::Circulation directly loads C4::Items, while C4::Items loads C4::Search which loads C4::Reserves which loads C4::Circulation. So...when inventory.pl loads C4::Items and C4::Circulation...we run into problems calling a sub from C4::Items within C4::Circulation, because there are conflicts/collisions in the namespace for subs from C4::Items (i.e. they've been loaded twice, so Perl has a hissy fit). Chris mentioned that the model for new Koha modules will be to have no circular dependencies, but for now...I'm thinking that we fully qualify calls to imported subs... -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.