On Wed, Sep 30, 2015 at 8:20 AM, Philippe Blouin <philippe.blo...@inlibro.com> wrote: > Because the code would be extremely specific to a specific functionality, > whereas the code in the libraries is there to be reused. > And let not go overboard with OO. > > A script is a script is a script. Make it readable, add functions to make > it cleaner, make your functions readable. > > And make some rule for forbidding direct DB accesses, so that future DB > changes do not require to change many scripts. > But please, do not forbid functions in scripts.
I tend to agree with Philipee here. It is a bit of an overkill to blanket require a single-script function to be moved over to a library. Perhaps a better approach would be to add some rules which set for the case where functions in scripts should be moved into the appropriate library versus when the definition of functions is acceptable in the script itself. Kind regards, Chris _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/