I cannot agree more with this assertion. Koha scripts have often been too 'smart' for their own good ; )
Over time this has definitely improved with more and more logic getting pushed into the Modules. I'd say this is where most bugs come from. The bug in the generation of fines in fines.pl vs returns.pl comes to mind. I think a long term goal is to have each system preference checked only once in the code base for any given behavior. That way these types of bugs won't occur. But now I'm getting all pie-in-the-sky and going off topic at the same time! I concur ! And I would add that the 2 level only logic we had (.pl / C4/.pm) was another
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8798 --- Comment #79 from Paul Poulain <paul.poulain@biblibre.com> --- (In reply to comment #78) source of bugs : any logic must sometimes/often be checked in different context, and it's sometimes checked differently.
To summarize, in our ideal Koha, scripts just get a bunch of stuff and pass it to the template, without doing much else. agreed !
In other words, we should encourage writing scripts in such a way that unit tests of their core functionality can be easily written. Test::www::Mechanize can also help us testing scripts in web-environment as well. It's sometimes tricky to be sure of the results, but, at least, we can be sure it returns a 200 ;-)
-- You are receiving this mail because: You are watching all bug changes.