<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>H David, <br>
</p>
<p>the coding guidelines are in effect as documented on the wiki:</p>
<p><a class="moz-txt-link-freetext" href="https://wiki.koha-community.org/wiki/Coding_Guidelines">https://wiki.koha-community.org/wiki/Coding_Guidelines</a></p>
<p>Changes and additions are discussed regularly at the development
meetings and documented in the meeting minutes. You can also
'watch' the wiki page to get informed whenever the page is
changed. At the moment I think we don't use Moose in Koha.</p>
<p>Hope this helps, <br>
</p>
<p>Katrin<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 13.09.2016 01:38, David Cook wrote:<br>
</div>
<blockquote
cite="mid:01b201d20d4e$cd2b68b0$67823a10$@prosentient.com.au"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Segoe UI Symbol";
panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><a moz-do-not-send="true"
name="_MailEndCompose"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">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? <o:p></o:p></span></a></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">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. <o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">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? <o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif">David
Cook<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif">Systems
Librarian<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif">Prosentient
Systems<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif">72/330
Wattle St<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif">Ultimo,
NSW 2007<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif">Australia<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif">Office:
02 9212 0899<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif">Direct:
02 8005 0595<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm
0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif"
lang="EN-US">From:</span></b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif"
lang="EN-US">
<a class="moz-txt-link-abbreviated" href="mailto:koha-devel-bounces@lists.koha-community.org">koha-devel-bounces@lists.koha-community.org</a>
[<a class="moz-txt-link-freetext" href="mailto:koha-devel-bounces@lists.koha-community.org">mailto:koha-devel-bounces@lists.koha-community.org</a>] <b>On
Behalf Of </b>Tomas Cohen Arazi<br>
<b>Sent:</b> Tuesday, 13 September 2016 4:32 AM<br>
<b>To:</b> koha-devel
<a class="moz-txt-link-rfc2396E" href="mailto:koha-devel@lists.koha-community.org"><koha-devel@lists.koha-community.org></a><br>
<b>Subject:</b> [Koha-devel] Coding patterns
discussion<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">I've been looking at our coding
patterns, and noticed we haven't discussed/agreed on some
stuff. Which is a good oportunity to just do it, now the
Koha:: namespace is being filled with cool old-code
rewrites with lots of test coverage.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">- Transactions on heavy business
functions that should definitely be wrapped inside a
transaction.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Running <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> $ cd Koha ; git grep txn<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">is just sad.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">- Little use of Exceptions in Koha.
We introduced them, but still don't extend its use.
Maybe related to the next item.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I think we should keep general
exceptions (like Koha::Exceptions::ObjectNotFound) in
the general Koha::Exceptions namespace. But move the
package-specific ones into its own file. To aid
maintenance. A good candidate are
Koha::Exceptions::Virtualshelves<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">- We don't use a Try/Catch library.
It would make it easier to use Koha::Exceptions with a
nice syntax.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">There are a couple interesting
libraries: Try::Tiny and TryCatch. [1] I prefer the
latter because the type check seems nicer to write and
eval (instead of an if/ifelse cascade checking
ref($exception) eq 'Something'.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I have my opinions on this items, and
it would be great to discuss it openly. There's code in
bugzilla waiting for QA, and it'd be great to have some
consensus on how to organize the code for the future.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Regards<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">[1] <a moz-do-not-send="true"
href="http://search.cpan.org/%7Eether/Try-Tiny-0.27/lib/Try/Tiny.pm">http://search.cpan.org/~ether/Try-Tiny-0.27/lib/Try/Tiny.pm</a> and <a
moz-do-not-send="true"
href="http://search.cpan.org/%7Eash/TryCatch-1.003002/lib/TryCatch.pm">http://search.cpan.org/~ash/TryCatch-1.003002/lib/TryCatch.pm</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<div>
<p class="MsoNormal">-- <o:p></o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><span
style="font-size:9.5pt;font-family:"Helvetica",sans-serif;color:#757575">Tomás
Cohen Arazi<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span
style="font-size:9.5pt;font-family:"Helvetica",sans-serif;color:#757575">Theke
Solutions (<a moz-do-not-send="true"
href="http://theke.io/">https://theke.io</a>)<br>
</span><span
style="font-size:9.5pt;font-family:"Segoe UI
Symbol",sans-serif;color:#757575">✆</span><span
style="font-size:9.5pt;font-family:"Helvetica",sans-serif;color:#757575">
+54 9351 3513384<br>
GPG: B2F3C15F<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Koha-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Koha-devel@lists.koha-community.org">Koha-devel@lists.koha-community.org</a>
<a class="moz-txt-link-freetext" href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a>
website : <a class="moz-txt-link-freetext" href="http://www.koha-community.org/">http://www.koha-community.org/</a>
git : <a class="moz-txt-link-freetext" href="http://git.koha-community.org/">http://git.koha-community.org/</a>
bugs : <a class="moz-txt-link-freetext" href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a></pre>
</blockquote>
<br>
</body>
</html>