Petal::Cookbook 2.19 review

Download
by rbytes.net on

Petal::Cookbook is a Perl module to recipes for building templates with Petal. This document contains some examples of Petal templ

License: Perl Artistic License
File size: 83K
Developer: William McKee
0 stars award from rbytes.net

Petal::Cookbook is a Perl module to recipes for building templates with Petal.

This document contains some examples of Petal template usage. Most of these examples deal with using Petal to generate HTML files from HTML templates.

BASICS

Template location

When using Petal for web application development, your templates should not need to be accessible by the webserver. In fact, it could be a security risk if they are available since there may be code or comments which users should not see prior to processing by Petal. Thus, it is recommended to store your templates in a non-web accessible directory. Personally I prefer to place the directory outside of the web root but you could also use permissions or .htaccess files to control access to the directory. This directory path should go into the $Petal::BASE_DIR global setting or the 'base_dir' argument for the new() constructor.

Template naming

Petal is indifferent about the name of the template files. Personally, I like to name my templates with the .tmpl extension to help myself and designers distinguish templates from static html. Some GUI editors, though, will not open files without a htm/html extension (esp. under Windows).

Requirements:
Perl

Petal::Cookbook 2.19 keywords