... without template system ...
I "invented" my own pure Perl language templating ...

First off, templating without a system which leads to a templating solution re-inventing the wheel is not something which won't be frowned upon not too much here. That said, your templating just consists in interpolating function call returns into here-docs via the babycart operator @{[]} - which is - boiled down - all what templating is about.

In a node above, you write:

The whole app is still in conception, texts and design will change often, and the form of translation isn't sure yet.
...
Transition shouldn't be to complicated later.

Well, most likely later on your static here-docs will be split up and parametrized as well, you'll most likely get tag classes, iterations, conditional iterations, css and javascript and such - and complexity will grow.

It is much like parsing XML with regular expressions - by the time you will have resolved all those issues, you will have written the better part of a templating system. And I bet it will be close to any one already done (including my attempt).

If none of the above will ever happen - well, then: looks fine to me. Hashes, function calls - straight forward.

I feel like an Old Grey Monk, now.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

In reply to Re: RFC: improvising multi language HTML by shmem
in thread RFC: improvising multi language HTML by LanX

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.