[Koha-devel] koha code cleaning bug?

Marc Chantreux marc.chantreux at biblibre.com
Tue Sep 30 09:28:21 CEST 2008


On Mon, Sep 29, 2008 at 03:27:52PM -0500, Galen Charlton wrote:
> We could, but it regardless of the decision, it would be of little
> practical effect unless it turns out people *really* care one way or
> the other.  You know my opinion on the use of $_ as an implicit
> iterator, but I would not use that as a primary criterion for
> accepting or rejecting patches.

After a night of reflexion, i give up:

I don't want another koha developper to loose some time to read code
just because i gain some time to write it (i don't want to blame myself
for it). Using perl stuff makes sense if everyone does it and even if it
will be officially recommanded by the coding style, it will not be
reality.

$_ is not the only one point that can confuse the code reader so i also
ban for my code: 

- grep, map 
- (List|Scalar)::Utils
- the <instruction> if <test> statement; 
- the unless loop
- regexp that using perl specific dialect

and write my perl code as close as possible from php.

> There are much bigger coding and stylistic problems to fix, including
> lack of use of the warnings pragma, circular module dependencies
> resulting in funky @EXPORT problems,  inconsistent indentation,
> out-of-date, POD, low test suite coverage, and so on.  I would rather
> that the style guide focus on the larger issues.

both are important because if a coder knows he have a chance to find the
"koha way" in the coding style document, he'll use it.

regards


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



More information about the Koha-devel mailing list