5 Answers
5

Text::HAML suggests otherwise, but while HAML seems, on the surface, to be language agnostic, complex templating needs would probably have to be handed off to the parent language (Ruby, Perl, whatever).
–
MkVJul 16 '10 at 14:42

@MkV well you're in luck you can now use Template::Plugin::Haml which allows you to hand off all the complex needs to TT. (coming soon to a cpan mirror near you (I just uploaded it))
–
xenoterracideJul 20 '10 at 7:24

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)

I consider the absence of looping constructs a plus. Mainly, because that way leads to hell paved with good intentions. Sure, perhaps mangling html in perl and feeding it through as a variable is worse, but at least you're not fooling yourself about some concept of context separation that way.
–
Kent FredricJul 22 '10 at 9:46

@Kent well to each there own, I would think it would be harder to render stuff from databases without it. I suppose someone can also write Catalyst::View::Haml and of course just because it's TT doesn't mean you have to use TT features.
–
xenoterracideJul 23 '10 at 6:51

Well there is a PHP port so I figured there might as well be a Perl one.
–
Matteo RivaNov 30 '09 at 14:56

1

Haml isn't intimately tied to Ruby syntax. There are implementations in several different languages, each of which includes some of that language's syntax, but the basic Haml syntax is language-agnostic.
–
nex3Nov 30 '09 at 17:19