[Koha-devel] 'Subroutine $FOO redefined' warnings in Koha

Jonathan Druart jonathan.druart at biblibre.com
Fri Nov 2 10:21:15 CET 2012


Hi all!

Yes of course these warnings are caused by circular dependencies.

Marc Chantreux (eiro) wrote a script to check them.

A script can be found attached. It generates 2 .dot files (see in the
graphCirc directory).
>From them you can generate 2 png files (after installing the package
graphviz, with the command dot circ.dot -Tpng -o circ.png).
The first file (too big to be attached), deps.dot.png will burn your eyes
:) It represents all dependencies in Koha (In fact in C4 only).
The second file, circ.dot.png shows you the circular dependencies only.

It is a speed written script and it certainly contains errors, be careful !

Regards,
Jonathan



2012/11/1 Marcel de Rooy <M.de.Rooy at rijksmuseum.nl>

> Yes:
>
> C4/Circulation.pm contains a    use C4::Accounts;
>
>
>
> -----Oorspronkelijk bericht-----
> Van: koha-devel-bounces at lists.koha-community.org [mailto:
> koha-devel-bounces at lists.koha-community.org] Namens Marcel de Rooy
> Verzonden: donderdag 1 november 2012 13:31
> Aan: Mason James; Koha Devel
> Onderwerp: Re: [Koha-devel] 'Subroutine $FOO redefined' warnings in Koha
>
> Circular dependency?
>
>
> -----Oorspronkelijk bericht-----
> Van: koha-devel-bounces at lists.koha-community.org [mailto:
> koha-devel-bounces at lists.koha-community.org] Namens Mason James
> Verzonden: donderdag 1 november 2012 12:09
> Aan: Koha Devel
> Onderwerp: [Koha-devel] 'Subroutine $FOO redefined' warnings in Koha
>
> hi Folks
>
> i was looking at bug 8559, and spotted some unusable 'Subroutine $FOO
> redefined' errors
>  http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8559
>
> i did a google, and got some general info about the common problem, but
> the info did was not enough for me to understand this specific problem in
> Koha :/
>
>
> does anyone have an idea what is happening here?
> are these warnings harmless enough to ignore? or do they reveal a bigger
> problem?
>
> any ideas?
>
>
>
> these warnings...
>
> $ perl  -w ./C4/Accounts.pm
> Subroutine recordpayment redefined at ./C4/Accounts.pm line 85.
> Subroutine makepayment redefined at ./C4/Accounts.pm line 165.
> Subroutine getnextacctno redefined at ./C4/Accounts.pm line 246.
> Subroutine chargelostitem redefined at ./C4/Accounts.pm line 289.
> Subroutine manualinvoice redefined at ./C4/Accounts.pm line 347.
> Subroutine fixcredit redefined at ./C4/Accounts.pm line 425.
> Subroutine refund redefined at ./C4/Accounts.pm line 534.
> Subroutine getcharges redefined at ./C4/Accounts.pm line 587.
> Subroutine ModNote redefined at ./C4/Accounts.pm line 604.
> Subroutine getcredits redefined at ./C4/Accounts.pm line 611.
> Subroutine getrefunds redefined at ./C4/Accounts.pm line 630.
> Subroutine ReversePayment redefined at ./C4/Accounts.pm line 652.
> Subroutine recordpayment_selectaccts redefined at ./C4/Accounts.pm line
> 686.
> Subroutine makepartialpayment redefined at ./C4/Accounts.pm line 739.
> Subroutine WriteOffFee redefined at ./C4/Accounts.pm line 785.
>
>
> and these warnings...
>
> $ perl  -w ./C4/Reserves.pm
> Subroutine AddReserve redefined at ./C4/Reserves.pm line 142.
> Subroutine GetReservesFromBiblionumber redefined at ./C4/Reserves.pm line
> 255.
> Subroutine GetReservesFromItemnumber redefined at ./C4/Reserves.pm line
> 336.
> Subroutine GetReservesFromBorrowernumber redefined at ./C4/Reserves.pm
> line 361.
> Subroutine CanBookBeReserved redefined at ./C4/Reserves.pm line 393.
> Subroutine CanItemBeReserved redefined at ./C4/Reserves.pm line 417.
> Subroutine GetReserveCount redefined at ./C4/Reserves.pm line 508.
> Subroutine GetOtherReserves redefined at ./C4/Reserves.pm line 532.
> Subroutine GetReserveFee redefined at ./C4/Reserves.pm line 582.
> Subroutine GetReservesToBranch redefined at ./C4/Reserves.pm line 685.
> Subroutine GetReservesForBranch redefined at ./C4/Reserves.pm line 710.
> Subroutine GetReserveStatus redefined at ./C4/Reserves.pm line 737.
> Subroutine CheckReserves redefined at ./C4/Reserves.pm line 776.
> Subroutine CancelExpiredReserves redefined at ./C4/Reserves.pm line 870.
> Subroutine AutoUnsuspendReserves redefined at ./C4/Reserves.pm line 913.
> Subroutine CancelReserve redefined at ./C4/Reserves.pm line 941.
> Subroutine ModReserve redefined at ./C4/Reserves.pm line 1056.
> Subroutine ModReserveFill redefined at ./C4/Reserves.pm line 1125.
> Subroutine ModReserveStatus redefined at ./C4/Reserves.pm line 1193.
> Subroutine ModReserveAffect redefined at ./C4/Reserves.pm line 1223.
> Subroutine ModReserveCancelAll redefined at ./C4/Reserves.pm line 1281.
> Subroutine ModReserveMinusPriority redefined at ./C4/Reserves.pm line 1303.
> Subroutine GetReserveInfo redefined at ./C4/Reserves.pm line 1329.
> Subroutine IsAvailableForItemLevelRequest redefined at ./C4/Reserves.pm
> line 1402.
> Subroutine AlterPriority redefined at ./C4/Reserves.pm line 1456.
> Subroutine ToggleLowestPriority redefined at ./C4/Reserves.pm line 1492.
> Subroutine ToggleSuspend redefined at ./C4/Reserves.pm line 1521.
> Subroutine SuspendAll redefined at ./C4/Reserves.pm line 1562.
> Subroutine _FixPriority redefined at ./C4/Reserves.pm line 1616.
> Subroutine _Findgroupreserve redefined at ./C4/Reserves.pm line 1721.
> Subroutine _koha_notify_reserve redefined at ./C4/Reserves.pm line 1830.
> Subroutine _ShiftPriorityByDateAndPriority redefined at ./C4/Reserves.pm
> line 1938.
> Subroutine MoveReserve redefined at ./C4/Reserves.pm line 1978.
> Subroutine MergeHolds redefined at ./C4/Reserves.pm line 2027.
> Subroutine RevertWaitingStatus redefined at ./C4/Reserves.pm line 2077.
> Subroutine ReserveSlip redefined at ./C4/Reserves.pm line 2131.
>
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : http://www.koha-community.org/ git :
> http://git.koha-community.org/ bugs : http://bugs.koha-community.org/_______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : http://www.koha-community.org/ git :
> http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20121102/5765e2f2/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CIRCDeps.pl
Type: application/octet-stream
Size: 1233 bytes
Desc: not available
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20121102/5765e2f2/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: circ.png
Type: image/png
Size: 77738 bytes
Desc: not available
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20121102/5765e2f2/attachment-0001.png>


More information about the Koha-devel mailing list