Re: Usage question

"Mark A. Fuller" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.html-template
Message-ID <10512338.1141614706685.JavaMail.root@elwamui-polski.atl.sa.earthlink.net>
From: Matias Alejo Garcia <[email protected]>
>
>Is there any way to, once the $template is filled, to dump the variables to
>a file?

I may not understand this correctly. But, you can print your $template->output() to a file (instead of STDOUT). Give essentially static HTML to the designer. She'd have to open each one individually. You just "print FH $template->output()". If you want to do some preprocessing like change the CSS link to a disk file instead of an HTTP link you can do something like "my $html = $template->output()" and do a "$html =~ s/<whatever>/<something>/". Then print the $html variable to a file.

If you want to give the designer the actual templates (but not require her to install the entire application), you could write a little script that would load each template, set variables and ->output() it to a file. Something like a script to run through some test cases (generate the page with the user logged in, not logged in, with an error message, with a success message, with the "you have mail" indicator set, etc.). This way the designer could change the template and regenerate some HTML (without actually using the entire application).

Mark


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.