I ran 'perl -wc' on a few of the C4 modules, and found that there are a number of circular dependencies, i.e., cases where two modules have "use" statements pointing at each other, or where Module1 uses Module2, which uses Module3, which uses Module1. Thanks to the magic of 'find | grep | tsort', I'm appending a list of these cycles at the end of this message. But 'perl -wc Module.pm' will also tell you if there's a cycle, by complaining that all of the functions in "Module.pm" are redefined. At first, I thought this meant that the first file in the loop would get read twice, but this doesn't appear to be the case. However, I think this does indicate spaghetti code and/or lack of modularity. -- Andrew Arensburger This message *does* represent the arensb@ooblick.com views of ooblick.com Do you want to make people's heads explode? Sure! We all do! C4/InterfaceCDK.pm C4/Circulation/Renewals.pm C4/Circulation/Issues.pm C4/Circulation/Main.pm C4/Reserves.pm C4/Interface/ReserveentCDK.pm C4/InterfaceCDK.pm C4/Accounts.pm C4/Interface/AccountsCDK.pm C4/InterfaceCDK.pm C4/Circulation/Renewals.pm C4/Interface/RenewalsCDK.pm C4/Accounts.pm C4/InterfaceCDK.pm C4/Circulation/Renewals.pm C4/Circulation/Issues.pm C4/Circulation/Main.pm C4/Reserves.pm C4/Accounts.pm C4/InterfaceCDK.pm C4/Circulation/Renewals.pm C4/Circulation/Issues.pm C4/Circulation/Main.pm C4/Circulation/Returns.pm C4/Search.pm C4/Reserves2.pm C4/Accounts.pm C4/InterfaceCDK.pm C4/Circulation/Renewals.pm C4/Circulation/Main.pm C4/Circulation/Issues.pm C4/Circulation/Borrower.pm C4/Circulation/Main.pm C4/Accounts.pm C4/InterfaceCDK.pm
On Sun, Oct 06, 2002 at 01:01:35PM -0400, Andrew Arensburger said: <snip> Ahh, I think the one to fix first is the Search and Reserves2 circular dependency. All the other modules are in fact used only be the curses based Circulation program. Which should be deprecated since its way out of date and very buggy. I think the easiest course would be to remove this code, and build a new interface using the C4::Circulation::Circ2 module plus Reserves2 and perl/tk or Sland or some other widget tool. Chris
C4/InterfaceCDK.pm C4/Circulation/Renewals.pm C4/Circulation/Issues.pm C4/Circulation/Main.pm C4/Reserves.pm C4/Interface/ReserveentCDK.pm
C4/InterfaceCDK.pm C4/Accounts.pm C4/Interface/AccountsCDK.pm
C4/InterfaceCDK.pm C4/Circulation/Renewals.pm C4/Interface/RenewalsCDK.pm
C4/Accounts.pm C4/InterfaceCDK.pm C4/Circulation/Renewals.pm C4/Circulation/Issues.pm C4/Circulation/Main.pm C4/Reserves.pm
C4/Accounts.pm C4/InterfaceCDK.pm C4/Circulation/Renewals.pm C4/Circulation/Issues.pm C4/Circulation/Main.pm C4/Circulation/Returns.pm
C4/Search.pm C4/Reserves2.pm
C4/Accounts.pm C4/InterfaceCDK.pm C4/Circulation/Renewals.pm
C4/Circulation/Main.pm C4/Circulation/Issues.pm
C4/Circulation/Borrower.pm C4/Circulation/Main.pm
C4/Accounts.pm C4/InterfaceCDK.pm
-- Chris Cormack Programmer 025 500 789 Katipo Communications Ltd chris@katipo.co.nz www.katipo.co.nz
On Mon, Oct 07, 2002 at 10:00:19AM +1300, Chris Cormack wrote:
All the other modules are in fact used only be the curses based Circulation program. Which should be deprecated since its way out of date and very buggy.
I think the easiest course would be to remove this code, and build a new interface using the C4::Circulation::Circ2 module plus Reserves2 and perl/tk or Sland or some other widget tool.
Ah, thanks. Could I please ask you to do this? You're a lot more familiar with the source than I am. I don't want to nuke anything valuable by mistake. What about the stuff in the telnet directory? Is that obsolete as well? Also, am I correct in assuming that modules and functions of the form <foo>2 are new versions, and that the corresponding <foo> should be considered obsolete? If so, wouldn't it be desirable to delete the old version and rename Foo2 to Foo ? -- Andrew Arensburger This message *does* represent the arensb@ooblick.com views of ooblick.com Always glad to share my ignorance -- I've got plenty.
On Sun, Oct 06, 2002 at 08:41:24PM -0400, Andrew Arensburger said:
On Mon, Oct 07, 2002 at 10:00:19AM +1300, Chris Cormack wrote:
All the other modules are in fact used only be the curses based Circulation program. Which should be deprecated since its way out of date and very buggy.
I think the easiest course would be to remove this code, and build a new interface using the C4::Circulation::Circ2 module plus Reserves2 and perl/tk or Sland or some other widget tool.
Ah, thanks. Could I please ask you to do this? You're a lot more familiar with the source than I am. I don't want to nuke anything valuable by mistake. What about the stuff in the telnet directory? Is that obsolete as well?
Yes indeed. Ill try to get onto this sometime after work this week. Ill do it in the main trunk, and leave the rel-1-2 branch alone at least until we release 1.2.3 (which should be soon) and then we can clean it out of there as well.
Also, am I correct in assuming that modules and functions of the form <foo>2 are new versions, and that the corresponding <foo> should be considered obsolete? If so, wouldn't it be desirable to delete the old version and rename Foo2 to Foo ?
Yep you are correct. Chris -- Chris Cormack Programmer 025 500 789 Katipo Communications Ltd chris@katipo.co.nz www.katipo.co.nz
participants (2)
-
Andrew Arensburger -
Chris Cormack