[Koha-devel] about package scope...

paul POULAIN paul.poulain at free.fr
Thu Jul 4 08:16:05 CEST 2002


I've just spend almost 1 hour to understand a bug...

He's due to the redundance of _itemcount_ sub : it exists in Search.pm 
AND in Catalogue.pm (aka Acquisition.pm for MARC).

In newbasket2.pl, in 1.2 branch it uses the Search.pm one, and that's 
what wanted.
In newbasket2.pl, in main branch, it uses the Catalogue.pm one, and 
THAT'S not the right one... It can be fixed by C4::Search::itemcount 
innstead of itemcount.

My question is :
* why does it use Search in 1.2 and Catalogue in main ? you must know 
that the use at the beginning of the script is the same, so it's not a 
declaration order problem.
* is it good to have the same function name in 2 packages ? I know the 
answer : no ! can someone propose a new name for one of those itemcounts 
? (katipo/chris maybe ?)

Next mail in a few minuts for sure ;-) (as kiwis are sleeping and USA 
are in holiday, i can send as many mails as i want, without being 
disturbed by an answer ;-))) )
--
Paul





More information about the Koha-devel mailing list