[Koha-devel] koha code cleaning bug?

Marc Chantreux marc.chantreux at biblibre.com
Mon Sep 29 17:02:31 CEST 2008


On Mon, Sep 29, 2008 at 10:26:28AM -0400, Sébastien Nadeau wrote:
> Hi Marc,
> 
> I understand your point better now.
> 
> I think this is the kind of stylistic improvement that must be done.
> 
> But about the iterator variable, here's what Damian Conway says in his 'Perl Best Practices' great book:
> 

Damian> It ($_) conveys nothing about the nature or purpose of the values it stores,

sure! feel free to comment your code :)

you can also 

use English; 
print $ARG;

keeping the advantage of implicit syntaxes like ( /foo/ , -d, print )
when possible. 

> He then gives examples to show how things can go down rapidly. I tend
> to agree with that because as the code evolves, the inner content of
> the block may change and sooner or later an explicit iterator variable
> will be needed.

that is a better arguement for me:

if you used the implicit syntax and you want to add a name for the old
$_, you can (murphy will say *must*) forget to rewrite an instruction
and this is just a new bug.


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



More information about the Koha-devel mailing list