Re: Stupid question
Chad Wallace <[email protected]> Thu, 7 Mar 2013 15:00:59 -0800
| Newsgroups | gmane.comp.lang.perl.modules.template-toolkit |
|---|---|
| Organization | The Lodging Company |
| Message-ID | <[email protected]> |
On Thu, 7 Mar 2013 12:34:23 -0700 Konnor Willison <[email protected]> wrote: > I'm completely new to perl and recently found out about template > toolkit and want to utilize it for my header and footers on my web > pages. > > I host at bluehost and am currently stuck on installation and proper > set up. > > 1. My current installation path > is /perl5/lib/perl5/Template-Toolkit-2.24/ is this right? Should it > be installed in another directory? The Template-Toolkit-2.24 directory is just the installation package. You should read the file named "README" inside that directory, and follow the instructions in the "INSTALL" file. > 2. I'm starting on how to use template toolkit by studying the tpage > program but everything I've found isn't very helpful, does anyone > have an example of how I can test tpage? Do I have to create any > files to use it? If so where do these files go? Was there a path that > I was suppose to specify for my templates? Generally, you'll need a template, which you could pass to tpage for testing, and in production you would probably process it from a perl script. But to play around, you can just run tpage without any parameters, and type in a template, then hit Ctrl-D when you're done. Something like this: [%- FOREACH i IN [ 1 .. 10 ] %] Line [% i %] [%- END %] -- C. Chad Wallace, B.Sc. The Lodging Company http://www.lodgingcompany.com/ OpenPGP Public Key ID: 0x262208A0