Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://574850]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2017-08-21 16:44 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (324 votes). Check out past polls.