On Sun, 21 Jan 2001, you wrote:

> Aside from all the inline HTML.
> 
> ARGH! When will people learn!

speaking of which ;)

so .. in an idle moment I'm supposed to be re jazzin' a mates website ..
uh huh, ... no inline HTML for me I says .. so instead of my normal method
[1] I think so .. everyone keeps drooling on about Template::Toolkit  best
use that. .. now heres the thing .. its really basic and I feel stoopid
asking .. yes I have read the docs but obvioulsy not the right bits...
how do you get the process() method to return the output to you instead of
printing the damn thing.??? 

I'll prolly have worked it out ... but hey feel free to jump right in

[1] me normal way ... make up a package containing all the ickle bits of
templates as subs taking a hashref  and then just return the contents.
never any code in the templates,  err like this ...

# calling routine
my (%data);
$data{text}='Hello World';
my ($result)=Template::test(\%data);

print $result;
exit 0;


package Template;

sub test{

my ($data)=shift;

return <<END;
<table>
  <tr>
    <td>$data->{text}</td>
  </tr>
</table>
END
}

-- 
Robin Szemeti

The box said "requires windows 95 or better"
So I installed Linux!

Reply via email to