I've been messing around with mod_perl and template toolkit for the last few days. I've been reading through a lot of information on the both. Before I started this, I knew how they both worked, but had never actually created a mod_perl installation from scratch. Now I have my own!
So I'm really only trying to do something simple with them both to begin, I want the following:
Re:Apache::Template
sumdeus on 2004-02-25T19:16:05
Thanks Randal. Now all I have to do is figure out how in the hell to get it installed without gcc on the machine.Without gcc?
rafael on 2004-02-25T21:24:59
What's your OS ? and how did you install mod_perl without gcc:) ? Re:Without gcc?
sumdeus on 2004-02-25T21:27:33
Dare I say it's a hosting company... where they/I have about 200 perl modules installed, but for some reason this isn't one of them. They don't have gnu tools for security reasons, of course for another 15 bucks a month I can get them. I'm stuck with them for another 1/2 a year, so I have to make due. Unfortunately I need gcc for the xs stuff.
However, if I were trying to do what you are doing (map
Then in My::TT::Handler you just look at the URI (see the documentation for the $r request object on the mod_perl site) and decide which file to run through TT based on that.<Files *.html>
SetHandler perl-script
PerlHandler My::TT::Handler
</Files>
This being apache, there are 1000 other ways to do it. Some are in the new TT book, one of them in on-line here, and all of the ways people do it with other systems like HTML::Template apply to TT as well.
Re:mapping URLs to template files
sumdeus on 2004-02-26T17:42:05
Very helpful, and nice since I don't need to install any additional modules. I will goof around with the handler... I was using Location directive instead of the Files so things were a little goofy.
Appreciate the comment.