Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: The history of a templating engine

by Aristotle (Chancellor)
on Sep 26, 2006 at 01:27 UTC ( #574850=note: print w/ replies, xml ) Need Help??


in reply to The history of a templating engine

Thanks for this writeup. I have been planning to embark on writing a templating system myself, so it was enjoyable to get to read a war story.

The first writeup I ever posted to PerlMonks was about a templating system I thought I should write, and had I embarked on it then, I would have followed the same journey as you have, and certainly with less success. I thought I should because all these template systems I found very so complex and full of features and so much slower than something like

s{ %% (\w+) (?: \s* || \s? \s*? (.+?) )? %% } { defined $var{ $1 } ? $var{ $1 } : $2 || '' }g;

(which is roughly what I was using – simple variable substitution with optional default values). I can only chuckle at my naïvete now… teehee. Of course the systems are all “bloated” – they start as simple schemes that can cover only stiflingly modest needs and invariably follow the same progression towards comprehensiveness.

Now, several years down the line, I know a lot more. It’s reassuring to read your account and find that I’ve contemplated every single point you mentioned. (It goes without saying that my design decisions differ greatly from what you describe, and also from everything found on CPAN – else why would I be thinking about it?) I might still be too lazy to do it; which is OK, in the big picture: CPAN isn’t terribly in need of another one of those… :-)

Makeshifts last the longest.


Comment on Re: The history of a templating engine
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://574850]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2014-10-25 18:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (147 votes), past polls