April 2017 Archives

Collisions in Block Names in Jemplate

Two Blocks with the Same Name

In January this year, I got Jemplate in the CPAN Pull Request Challenge. The module implements Template::Toolkit in JavaScript, so you can transfer the burden to process the templates from the server to the client.

One of the open issues in its GitHub repository caught my attention: Jemplate compiled all the templates coming from different files into one large JavaScript code-block. If you declared two blocks with the same name in two different files, they’d end up in the same hash in JavaScript, and only one would survive—but you couldn’t tell which one. Keeping block names unique across files probably isn’t part of common practice, so making the module warn you in such a case sounded like a reasonable requirement.

OrePAN2 Processes MetaCPAN Lookups in Chunks

The issue

In the last month of 2016, I was assigned OrePAN2 in the CPAN Pull Request Challenge. When browsing its issues on GitHub, I discovered #47:

About E. Choroba

user-pic I blog about Perl.