<div dir="ltr">I mentioned this in #koha a few weeks ago, but this seems like a perfect place to bring it up again:<div><br></div><div><a href="http://devblog.nestoria.com/post/115930183873/tombstones-for-dead-code">http://devblog.nestoria.com/post/115930183873/tombstones-for-dead-code</a><br></div><div><br></div><div>Essentially, this is a method for adding executable markers near code that you want to remove. If you look for the results of the markers, and never find them, you know that the code has never been called, and is safe to remove (watch the video for discussion of a few subtle points)</div><div><br></div><div>--Barton</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 28, 2015 at 10:35 AM, Tomas Cohen Arazi <span dir="ltr"><<a href="mailto:tomascohen@gmail.com" target="_blank">tomascohen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">We have dead code in lots of places. A cleanup is not a bad idea, but we should be careful with API changes because someone could be using it. I didn't spend time on looking at the code. We can add it to the agentda for the meeting.</div><div class="gmail_extra"><br><div class="gmail_quote">2015-05-28 11:31 GMT-03:00 Mark Tompsett <span dir="ltr"><<a href="mailto:mtompset@hotmail.com" target="_blank">mtompset@hotmail.com</a>></span>:<div><div class="h5"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Greetings,<br>
<br>
Indranil Das Gupta found this painful to see typo in getFrameworkLanguages: 'native_descrition'=>$language_set->{language_native_description}.<br>
I told him, tweaking C4/Languages requires writing a test (good rule of thumb). So, I wake up, and discover no tests were yet written, and I was itching for a sign off. So, I attempt and discover the hole is deeper than initially thought. In fact, Indranil Das Gupta pointed out to me that it doesn't seem to be used anywhere.<br>
<br>
mtompset@debian:~/kohaclone$ git grep getFrameworkLanguages<br>
C4/Languages.pm:        memoize_memcached('getFrameworkLanguages' , memcached => C4::Context->memcached);<br>
<br>
Part of an export --<br>
C4/Languages.pm:        &getFrameworkLanguages<br>
<br>
More exporting --<br>
C4/Languages.pm:    @EXPORT_OK = qw(getFrameworkLanguages getTranslatedLanguages getAllLanguages getLanguages get_bidi regex_lang_subtags language_get_description accept_language getlanguage);<br>
<br>
POD stuff --<br>
C4/Languages.pm:=head2 getFrameworkLanguages<br>
<br>
POD stuff example --<br>
C4/Languages.pm: my $languages = getFrameworkLanguages();<br>
<br>
Actual function head --<br>
C4/Languages.pm:sub getFrameworkLanguages {<br>
<br>
<br>
As you can tell I didn't comment on one piece: that memoize_memcached line. Is there another thing to trace to figure out if it is used in the memoize logic somewhere, or is it safe to remove this function? Feedback appreciated.<br>
<br>
What bug 14284 becomes is dependent on feedback.<br>
<a href="http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14284" target="_blank">http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14284</a><br>
<br>
GPML,<br>
Mark Tompsett <br>
_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.org/</a><br>
</blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div>Tomás Cohen Arazi</div><div>Prosecretaría de Informática</div><div>Universidad Nacional de Córdoba</div><div>✆ <a href="tel:%2B54%20351%205353750%20ext%2013168" value="+543515353750" target="_blank">+54 351 5353750 ext 13168</a></div><div>GPG: B76C 6E7C 2D80 551A C765  E225 0A27 2EA1 B2F3 C15F</div></div></div>
</font></span></div>
<br>_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org">Koha-devel@lists.koha-community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.org/</a><br></blockquote></div><br></div>