[Koha-bugs] [Bug 8798] Add the use of DBIx::Class

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 21 18:06:23 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8798

--- Comment #78 from Kyle M Hall <kyle at bywatersolutions.com> ---
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!

To summarize, in our ideal Koha, scripts just get a bunch of stuff and pass it
to the template, without doing much else.

> That depends on how one writes them.  If we think of a "script" as most of
> the time being a wrapper that gathers command-line parameters, then calls
> one or more functions or methods that exist in the Koha namespace, those
> functions can readily be included in the Test::More-based tests.
> 
> In other words, we should encourage writing scripts in such a way that unit
> tests of their core functionality can be easily written.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list