views:

67

answers:

3

CPAN has the Template::Declare package. A declarative way to create html templates in perl code without any html directly written.

I would love to use similar packages in python and ruby. Are there equivalent packages for those languages?

A: 

Are you looking for something like Haml in Ruby ?

Example for Ruby :

$ sudo gem install haml
$ irb
> require 'haml'
> Haml::Engine.new('%p Hello, World').render
=> "<p>Hello, World</p>\n"
David
I know haml but it is still a different language. I would like ruby templating in ruby code and python templating in python code.
mugen kenichi
+4  A: 

In Ruby there is Markaby. The closest I know if in Python is Brevé.

Also there are a few more in Perl and other languages as well.

/I3az/

draegtun
That is pretty much what i was looking for. Thanks for the link to the other question.
mugen kenichi
A: 

If you like the look of Markaby, also see Erector which is inspired by it but said to be somewhat cleaner

telent