Hi all, A while ago, ranguard++ on IRC said it might be nice to have an application that could take HTML templates (TT, etc.) and render them with a set of static data. The idea is that you can give a small app and templates to your non-Perl-developer web designer, and and s/he can work on them offline without needing the full Cat app or a dev server (or Perl skills, etc.)
Well, I wrote this application and it's on the CPAN as
App::TemplateServer. You run it like:
template-server --docroot /path/to/templates \
--docroot /more/templates \
--data preconfigured_data.yml
Then you point your browser to http://localhost:4000/ and enjoy the
templates!
By default, TT is used, but you can install other "Providers" which let
you use other templating systems. Mason and HTML::Template are on CPAN
right now (App::TemplateServer::Provider::*). TD is there too, but it's
broken (agent_zh++ and I are working on that...) Writing your own is a
small matter of implementing a single function, so there's no excuse to
not upload a driver for your favorite templating system right now :)
The other use I envision is experimenting with templating systems. Say
you hear a talk about TD and want to try it out? Now you can write the
template and see it instantly... no writing driver code, no making a
test Catalyst app, etc. Enjoyable!
BTW, the module I use for generating mock objects from a YAML file
(Package::FromData) might be useful for testing. Check it out.
Any feedback is welcome.
Regards,
Jonathan Rockway
signature.asc
Description: This is a digitally signed message part
_______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
