http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12598 --- Comment #15 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #14)
(In reply to Kyle M Hall from comment #13)
That is why my initial patch allowed the existing tools/import_borrowers.pl script to be used from the command line. However, I was told that is no longer allowed ( tools/export.pl has this behavior ), though it is not stated in the coding guidelines.
We all know it's a very bad idea. tools/export.pl is the perfect example, it's a pain to maintain it.
The script should also use Pod2Usage (instead of the print_help routine).
Is this in the coding guidelines?
I don't know, all new scripts in misc use Pod2Usage. I think it's a good way to follow, don't you think?
Agreed, but I've already implemented it a different way. Please suggest to the RM that this be put in the coding guidelines. We can vote on it at the next meeting.
I am completely aware of the quantity of work to provide to reach a correct quality of core here: refactoring, unit tests, etc.
Not sure why this would be required for code we already know works...
If the code is moved to a new subroutine, it will require to be covered by UT.
I do agree, but I think it's a heavy load to put on one developer. Put it this way, I'd be willing to move the code to shared subroutines if someone else would volunteer to write unit tests.
While I agree in general, this is proven code, and your proposal would add an order of magnitude to the development with no real gains. I would much prefer we allow tools/import_borrowers.pl to be used from the command line for this exact reason.
The gain is the "maintainability" (this word exist?) of the code. In the current state, the code is duplicated.
Yep, that's the correct word. And that is why I prefer to have tools/import_borrowers.pl work from the command line. I think it's the best compromise. I don't think these changes introduce any serious maintenance issues. If you inspect the code the changes are almost entirely if/else's for passing output messages to the template or to the command line depending on how it is run. -- You are receiving this mail because: You are watching all bug changes.