[htmltmpl] writing directly to stdout while using h::t
Brought to you by:
samtregar
From: <pk...@ei...> - 2003-06-25 15:28:03
|
vexing issue, pl bear with me. I am using a module that allows me to create images (think gd). Typically I write the image to a temp directory, and then include that image in my html template (see example below)... .. in the script .. saveImage($tmpimgname, $tmpimgdir, etc. etc.); $template->param(myimg => $tmpimgname); .. .. and then in the template .. <img src="tmpimgdir/<tmpl_var myimg>"> .. everything works fine. Now here is the problem. In the saveImage method above, if I use undef instead of the $tmpimgname, perl writes the image directly to the web server. This is a great facility because not only do I not have to worry about writing a cronjob to take out the trash in the $tmgimgdir, it is also significantly faster because there is no extra write, read to the disk involved for the image. Except, while using h::t I can't do this. Or, at least I think I can't do this because I can't figure out how to have the template see the stdout. I am shooting in the dark here, and will be posting on the list for the above mentioned module also. I am posting to this list also... if only to find out that what I am wanting can't be done... that would be great to know as well. Many thanks. -- Puneet Kishor |