[Koha-devel] Coding patterns discussion

Kyle Hall kyle.m.hall at gmail.com
Tue Sep 13 12:19:33 CEST 2016


On Mon, Sep 12, 2016 at 7:38 PM, David Cook <dcook at prosentient.com.au>
wrote:

> I didn’t even know Koha::Exceptions was a thing! How does it work? Wasn’t
> Kyle going to work on some sort of developer handbook so there would be a
> central repository of guidelines/patterns?
>

You can find it here:
https://wiki.koha-community.org/wiki/Developers_Handbook

It doesn't have any documentation on using Exceptions, and that would
definitely be a good addition. I feel like it's a bit "messy" as I started
it by using the coding guidelines as a base, but it's not a bad start! If
anyone wants to work on it, please do!


>
>
> I read the Koha Coding Guidelines many moons ago, but it would be nice to
> know when there are updates. Since I’m not as active in the community these
> days, I don’t know if I have much of a say over things anymore, but it
> would be good to be informed of updates to the guidelines, so that a person
> can contribute more efficiently when one does contribute.
>
>
>
> TryCatch requires Moose while Try::Tiny is lightweight, but I guess we’re
> going down the Moose rabbit hole anyways these days? Doesn’t TryCatch just
> do try/catch/catch instead of if/elsif/elsif?
>

I had thought TryCatch's use of Moose would be a deal-breaker ( at least
until Koha is officially plack-only ), but after inspecting the code, I
don't believe it actually uses Moose. It does use packages in the Moose
namespace, but it doesn't appear to use Moose itself, though it's possible
I didn't go far enough down the rabbit hole. At this point I think I'm in
favor of TryCatch instead of Try::Tiny do to it's ability to catch multiple
types of exceptions and it's avoidance of messing with error handlers.

Kyle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20160913/fc580fcf/attachment.html>


More information about the Koha-devel mailing list