chingomaster
Programmer
Hello dear programmer colleagues,
we are currently planning to invole the Perl Template Toolkit into our Web Development - in the past we just mixed code and layout - a common problem!
Template Toolkit is our choice - especially the ability to compile Template files into much faster Perl Code is working great, and fast.
Now I am wondering, if it is possible to directly compile Templates from our database. Think of this task: The perl script retrieves the Template Layout from our database at script start.
Then the Script should be able to compile the Template to perl-code, and just run from the perl-code! This is - as i see it - only possible if I retrieve the Template files from the file system.
eg. if I use this Template file:
/templates/one.tmpl
it creates:
/templates/one.tmpl.pp (compiled template)
Is it possible to use the compiling mechanism when retrieving data directly from Database? e.g compiling the Template into a (referenced) scalar and just run this scalar?
Many Greetings
chingomaster
we are currently planning to invole the Perl Template Toolkit into our Web Development - in the past we just mixed code and layout - a common problem!
Template Toolkit is our choice - especially the ability to compile Template files into much faster Perl Code is working great, and fast.
Now I am wondering, if it is possible to directly compile Templates from our database. Think of this task: The perl script retrieves the Template Layout from our database at script start.
Then the Script should be able to compile the Template to perl-code, and just run from the perl-code! This is - as i see it - only possible if I retrieve the Template files from the file system.
eg. if I use this Template file:
/templates/one.tmpl
it creates:
/templates/one.tmpl.pp (compiled template)
Is it possible to use the compiling mechanism when retrieving data directly from Database? e.g compiling the Template into a (referenced) scalar and just run this scalar?
Many Greetings
chingomaster