Pre-3.0 Code Cleaning

This page try to describes step by step what Antoine F. will do in the next weeks to clean koha code.

Here is a TODO list for each script or module.

To each files

  • is this script used ? if NO : i'll write it here, and remove it after a while.
  • is every sub in the script used somewhere, usefull & not redundant with another sub ? if NO : i'll write it here, and remove it after a while.
  • is there a good POD ? if NO : i'll write it.
  • is it perlish ? (see perldoc perlstyle)
  • is it good coded ? (see the coding guidelines)
  • is it clear ? (variables names, is there some duplicated code ?) if NO : use more explanatory variable / sub names
  • does the execution generate some warnings ?

So as to see all warnings, it's may be practice to use warnings pragmas. To do this wihtout modifying all perl scripts, you can specify environnement variable PERL5OPT to ”-w”.

 export PERL5OPT="-w"

or write SetEnv PERL5OPT ”-w” on your apache virtual host.

To perl script (*.pl)

  • don't use SQL queries on it. (unless this script is on admin/ or tools/ directory)

To perl modules (*.pm)

Unused Files/Functions

Here is a list of files and/or functions which seems to be unused in head. If not, please write it here !

  • acqui/select-late.pl is never called. Moreover its template does'nt exist too.
  • acqui/spent.pl too.
  • acqui/bookfund.pl. Never called. Code not cleaned.
  • C4/Maintenance.pm. Never called on head.
 
en/development/codecleaning.txt · Last modified: 2007/12/26 12:18 by kados
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki