Perl-related stuff and beyond (but not much)

Thursday, April 30, 2009

HTML::Mason is easy

For years we've been using HTML::Template and HTML::Template::Expr modules on our site, and it all worked pretty well. In the last few months I've been implementing some complex form validators with items that appear on the site based on non-trivial URI rules.

I need some template engine that I could program the complex presentation part with, so I choose HTML::Mason. Being that our site is served by a Perl daemon process, I can't use $r or plethora of Apache2 modules inside my templates but without that HTML::Mason is powerful enough and it works pretty well. Combining the new template engine with some Moose-based objects saved me couple of months of development time. Hooray for HTML::Mason!

3 comments:

rjbond3rd said...

Can you share a bit more on the custom Perl daemon that you use to serve your site, rather than Apache or another web server? Thanks in advance.

darko said...

@rjbond3rd: it's just a regular perl program that forks 10 children and communicates with clients via apache mod_perl module. The starting and stopping is controlled via svc from daemontools. It works great even in paranoid mode (taint mode is turned on, children die on (rare) warnings).

indiroma said...

ITemplatez.com offers professional web templates, flash templates ,swish templates, dreamweaver templates, and other web design productsavailable for immediate download.