Question

Is it possible to use Haml instead of a templating engine with the Catalyst web framework?

Was it helpful?

Solution

As far as I know (as the author of Haml), there's no Perl implementation yet.

OTHER TIPS

Text::Haml exists now. I'm looking at maybe using it instead of HTML.HAML seems to lack some complex templating constructs such as conditionals and loops, so I'm considering writing a Template::Plugin::HAML to integrate for those extra constructs.

UPDATE

I implemented Template::Plugin::Haml using Text::Haml so now you and use Haml in your Template-Toolkit templates, which of course are easy to make on Catalyst. (note: if it says it's not there give it 24 hours and check again I just uploaded it)

A Perl version of Haml is in the works here:

http://github.com/vti/text-haml

Maybe Template::Declare could be an alternative?

From what I could see, HAML is a ruby-only thing. Like most Ruby "DSLs" it's really just using Ruby syntax as an API and can't really be done outside of Ruby without implementing all of it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top