[Koha-patches] [PATCH] fix 2419

Marc Chantreux marc.chantreux at biblibre.com
Thu Oct 9 17:49:03 CEST 2008


hello, 

On Thu, Oct 09, 2008 at 11:04:41AM -0400, Joe Atzberger wrote:
> Marc --
> 
> This doesn't quite make sense, since there is already a "require Exporter;"

Right! i didn't noticed it ...

> line in the BEGIN block.

and i think *that* is actually the problem

- there is no reason to have a BEGIN block
- as the BEGIN block is executed asap, i think that the exporter does
  its job before perl loads functions 

i just revamped as it: 

use strict;
require Exporter;
use vars qw($VERSION @ISA @EXPORT);
$VERSION = 3.01; # set the version for version checking
@ISA    = qw(Exporter);
@EXPORT = qw(
        &GetBookSeller &GetBooksellersWithLateOrders &GetBookSellerFromId
        &ModBookseller
        &DelBookseller
        &AddBookseller
);

and it works fine! Do you want me to submit another patch ? 

> What reason is there to prefer "use Exporter" here? 

you're right: there is nothing to import! 

-- 
Marc Chantreux
http://www.biblibre.com
Expert en Logiciels Libres pour l'info-doc



More information about the Koha-patches mailing list