[Koha-patches] [PATCH] Replace TMPL_ELSIF with TMPL_ELSE and TMPL_IF in label-manager.tmpl;

Chris Nighswonger chris.nighswonger at liblime.com
Mon Jul 28 20:05:35 CEST 2008


On Mon, Jul 28, 2008 at 1:25 PM, Jesse Weaver <jesse.weaver at liblime.com>wrote:

> On Mon, Jul 28, 2008 at 11:18 AM, MJ Ray <mjr at phonecoop.coop> wrote:
>
>> "Joshua Ferraro" <jmf at liblime.com> wrote:
>> > MJ, can you clarify the purpose of this patch? Why are you preferring
>> > separate ELSE and IF over ELSIF ?
>>
>> It doesn't seem to work reliably on one of my Koha 3 systems.
>> TMPL_ELSIF appears to be a fairly recent HTML::Template::Pro-ism so it
>> limits portability and there's a big WARNING on perldoc
>> HTML::Template::SYNTAX, so it seemed like a good idea to remove it.
>> What's the problem?
>>
>> Hope that explains,
>> --
>> MJ Ray (slef)
>>
>>
> As far as portability goes, Koha 3.0 depends on a recent version of
> HTML::Template::Pro anyway. We also use TMPL_EXPRs in a few strategic
> places, and those are only supported by Template::Pro and Template::Expr. Do
> you have the most recent version of the module?
>

TMPL_ELSIF was introduced into H::T::P at my request as it increases the
readability of the templating code. It was introduced into Koha with this
commit back in early March:

http://git.koha.org/cgi-bin/gitweb.cgi?p=Koha;a=commit;h=710afb6251f7ecd617a71a68e2ab313a61a6e54d

Three days later the first use was introduced with a reminder note:

http://git.koha.org/cgi-bin/gitweb.cgi?p=Koha;a=commit;h=6a61c4b6a9d50b7cf735d1bcc83543ea6092cc9d

No one has complained about reliability to this point to my knowledge. While
that's not infalliable, it does seem to be significant.

I would also suggest verifying that those installations have the correct
version of H::T::P installed.

Kind Regards,

-- 
Chris Nighswonger

LibLime
www.liblime.com
chris.nighswonger at liblime.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-patches/attachments/20080728/a3813f44/attachment-0002.htm>


More information about the Koha-patches mailing list