Bug 8871 - Many "subroutine redefined" warnings from C4 and Koha modules
Summary: Many "subroutine redefined" warnings from C4 and Koha modules
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Galen Charlton
QA Contact:
URL:
Keywords:
Depends on: 34838
Blocks: 25790
  Show dependency treegraph
 
Reported: 2012-10-03 21:32 UTC by Mason James
Modified: 2023-09-20 08:33 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mason James 2012-10-03 21:32:27 UTC
running $ perl -w ./C4/Reserves.pm 

generates....

Subroutine AddReserve redefined at ./C4/Reserves.pm line 143.
Subroutine GetReservesFromBiblionumber redefined at ./C4/Reserves.pm line 256.
Subroutine GetReservesFromItemnumber redefined at ./C4/Reserves.pm line 337.
Subroutine GetReservesFromBorrowernumber redefined at ./C4/Reserves.pm line 362.
Subroutine CanBookBeReserved redefined at ./C4/Reserves.pm line 394.
Subroutine CanItemBeReserved redefined at ./C4/Reserves.pm line 418.
Subroutine GetReserveCount redefined at ./C4/Reserves.pm line 509.
Subroutine GetOtherReserves redefined at ./C4/Reserves.pm line 533.
Subroutine GetReserveFee redefined at ./C4/Reserves.pm line 583.
Subroutine GetReservesToBranch redefined at ./C4/Reserves.pm line 686.
Subroutine GetReservesForBranch redefined at ./C4/Reserves.pm line 711.
Subroutine GetReserveStatus redefined at ./C4/Reserves.pm line 738.
Subroutine CheckReserves redefined at ./C4/Reserves.pm line 777.
Subroutine CancelExpiredReserves redefined at ./C4/Reserves.pm line 871.
Subroutine AutoUnsuspendReserves redefined at ./C4/Reserves.pm line 914.
Subroutine CancelReserve redefined at ./C4/Reserves.pm line 942.
Subroutine ModReserve redefined at ./C4/Reserves.pm line 1057.
Subroutine ModReserveFill redefined at ./C4/Reserves.pm line 1126.
Subroutine ModReserveStatus redefined at ./C4/Reserves.pm line 1194.
Subroutine ModReserveAffect redefined at ./C4/Reserves.pm line 1224.
Subroutine ModReserveCancelAll redefined at ./C4/Reserves.pm line 1282.
Subroutine ModReserveMinusPriority redefined at ./C4/Reserves.pm line 1304.
Subroutine GetReserveInfo redefined at ./C4/Reserves.pm line 1330.
Subroutine IsAvailableForItemLevelRequest redefined at ./C4/Reserves.pm line 1403.
Subroutine AlterPriority redefined at ./C4/Reserves.pm line 1457.
Subroutine ToggleLowestPriority redefined at ./C4/Reserves.pm line 1493.
Subroutine ToggleSuspend redefined at ./C4/Reserves.pm line 1522.
Subroutine SuspendAll redefined at ./C4/Reserves.pm line 1563.
Subroutine _FixPriority redefined at ./C4/Reserves.pm line 1617.
Subroutine _Findgroupreserve redefined at ./C4/Reserves.pm line 1722.
Subroutine _koha_notify_reserve redefined at ./C4/Reserves.pm line 1831.
Subroutine _ShiftPriorityByDateAndPriority redefined at ./C4/Reserves.pm line 1939.
Subroutine MoveReserve redefined at ./C4/Reserves.pm line 1979.
Subroutine MergeHolds redefined at ./C4/Reserves.pm line 2025.
Subroutine ReserveSlip redefined at ./C4/Reserves.pm line 2069.
Comment 1 Ketan Kulkarni 2013-09-27 03:43:21 UTC
Modules like
C4::Members
C4::Circulation
C4::Accounts
C4::Letters

have 
use Reserve; in them. 

And 
C4::Reserve

in turn uses the above modules.
Comment 2 Katrin Fischer 2015-06-07 00:24:41 UTC
The list grew longer since this was posted (35 -> 46).
Comment 3 Katrin Fischer 2019-04-28 11:36:58 UTC
36 now.(In reply to Katrin Fischer from comment #2)
> The list grew longer since this was posted (35 -> 46).

36 now.
Comment 4 Jonathan Druart 2020-12-16 09:20:54 UTC
This is not specific to C4/Reserves.pm. We have circular dependencies in all our C4 modules.
Comment 5 Katrin Fischer 2023-01-08 02:04:16 UTC
(In reply to Jonathan Druart from comment #4)
> This is not specific to C4/Reserves.pm. We have circular dependencies in all
> our C4 modules.

How should we go about this? Is there a chance to fix those or is this more a matter of moving more things to Koha: to clean up the code more?
Comment 6 Jonathan Druart 2023-02-01 10:24:38 UTC
(In reply to Katrin Fischer from comment #5)
> (In reply to Jonathan Druart from comment #4)
> > This is not specific to C4/Reserves.pm. We have circular dependencies in all
> > our C4 modules.
> 
> How should we go about this? Is there a chance to fix those or is this more
> a matter of moving more things to Koha: to clean up the code more?

Not really...

% perl -w C4/Circulation.pm 2>&1|wc -l
53
% perl -w C4/Reserves.pm 2>&1|wc -l
35

% perl -w Koha/Item.pm 2>&1|wc -l
56
% perl -w Koha/Patron.pm 2>&1|wc -l
83