[Koha-devel] Bug 5636

Chris Cormack chris at bigballofwax.co.nz
Mon Dec 12 18:24:04 CET 2011


On 13 December 2011 06:11, LAURENT Henri-Damien <laurenthdl at alinto.com> wrote:

>>
> Hi,
> in my opinion, it is not "dual-purpose" script,
> command-line or web interface, it is the same process you want.
> duplicating code and editing to make the code commandline compliant
> would be far harder to maintain and keep synched than having the script
> callable via command-line and web. In my opinion, we have enough
> exemples of copy paste edit code in Koha, to see how un maintainable
> that behaviour is and to be willing to restrain from that from now on.
> This is my opinion.

I agree, if code is used in more than one place it should be in a
module, in fact our scripts should be as lightweight as possible and
as close to simple wrappers for functionality in perl modules.

So I agree that we should not copy paste code, but we should cut and
paste it into modules and have the scripts use it from there.

Chris


More information about the Koha-devel mailing list