Perl
  Home arrow Perl arrow Page 4 - Getting Started with the Perl Template...
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PERL

Getting Started with the Perl Template Toolkit
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 20
    2004-07-28

    Table of Contents:
  • Getting Started with the Perl Template Toolkit
  • The Templating Ecosystem
  • Installing the Template Toolkit
  • Documentation and Support
  • Using the Template Toolkit
  • The Template Module
  • The Template Toolkit Language
  • Dynamic Variables
  • Template Processing Directives
  • Integrating and Extending the Template Toolkit

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    PCmover - $15 Off with Coupon Code CJPH7Q

    Getting Started with the Perl Template Toolkit - Documentation and Support
    (Page 4 of 10 )

    In this section, we take a look at the support that is available for the Template Toolkit.

    Viewing the Documentation

    The Template Toolkit comes with an incredible amount of documentation. The documentation is supplied in the standard Perl Plain Old Documentation (POD) format. Once you have installed the Template Toolkit, you can see any of the documentation pages using perldoc or man, just as you can with any other Perl module:

    $ perldoc Template    # should always work
    $ man Template        # does not work everywhere

    During the Template Toolkit installation procedure you are offered the chance to install HTML versions of the documentation. The default location for the installation of these files is /usr/local/tt2 under Unix and C:/Program Files/Template Toolkit 2 under Win32. The installation procedure prompts for alternate locations.

    If you are running a web server on your local machine, you can configure it to know where these files are. For example, you might put the contents of Example 1-4 in the httpd.conf for an Apache web server.

    # TT2 Alias /tt2/images/     /usr/local/tt2/images/ Alias /tt2/docs/             /usr/local/tt2/docs/html/ Alias /tt2/examples/         /usr/local/tt2/examples/html/

    <Directory /usr/local/tt2/>
         Options Indexes 
         AllowOverride None 
         Order allow,deny
         Allow from all
    </Directory>

    Example 1-4. Apache configuration directives to view Template Toolkit documentation

    You can now access the locally installed documentation by pointing your browser at http://localhost/tt2/docs. For more information on configuring your web server, see the INSTALL file that comes with the Template Toolkit.

    The complete documentation set is also available online at the Template Toolkit web site. You can find it at http://www.template-toolkit.org/docs.html.

    Overview of the Documentation

    A large number of manual pages come with the Template Toolkit. Here is a list of some of the most useful ones:

    Template

    The manual page for the Template module, the main module for using the Template Toolkit from Perl.

    Template::Manual

    An introduction and table of contents for the rest of the manual pages.

    Template::Manual::Intro

    A brief introduction to using the Template Toolkit. Not unlike this chapter.

    Template::Manual::Syntax

    The syntax, structure, and semantics of the Template Toolkit directives and general presentation language. Chapter 3 covers this aspect.

    Template::Manual::Variables

    A description of the various ways that Perl data can be bound to variables for accessing from templates. Chapter 3 also has the details.

    Template::Manual::Directives

    A reference guide to all Template Toolkit directives, with examples of usage. See Chapter 4.

    Template::Manual::VMethods

    A guide to the virtual methods available to manipulate Template Toolkit variables. These are also covered in Chapter 3.

    Template::Manual::Filters

    A guide to the various standard filters that are supplied with the Template Toolkit. See Chapter 5.

    Template::Manual::Plugins

    A guide to the various standard plugins that are supplied with the Template Toolkit. See Chapter 6.

    Template::Manual::Internals

    An overview of the internal architecture of Template Toolkit. See Chapter 7.

    Template::Manual::Config

    Details of the configuration options that can be used to customize the behavior and extend the features of the Template Toolkit. This is covered in the Appendix.

    Template::Manual::Views

    A description of dynamic views—a powerful but experimental feature in the Template Toolkit. The use of views is covered briefly in Chapter 9.

    Template::Tutorial

    An introduction and table of contents to the tutorials that are distributed with Template Toolkit. Currently there are two. Template::Tutorial::Web is a quick start to using the Template Toolkit to create web pages, and Template::Tutorial:: Datafile is a guide to creating datafiles in various formats (particularly XML). See Chapter 2 and Chapter 10 for more information about using the Template Toolkit to generate web pages and XML, respectively.

    Template::Library::HTML and Template::Library::Splash

    Two guides to using libraries of user interface components (widgets) for creating HTML with the Template Toolkit.

    Template::Modules

    A list of the various Perl modules that make up the Template Toolkit. Each module has its own manual page.

    Accessing the Mailing List

    If you can’t find the answer to your questions in any of the documentation, you can always turn to the mailing list set up for discussion of the Template Toolkit. You can subscribe to the mailing list at: http://template-toolkit.org/mailman/listinfo/templates. All previous posts are archived at: http://templatetoolkit.org/pipermail/templates.

    Activity on the list is moderate (around 100 messages per month) and many of the Template Toolkit experts are on the list.  

    Buy the book!If you've enjoyed what you've seen here, or to get more information, click on the "Buy the book!" graphic. Pick up a copy today!

    Visit the O'Reilly Network http://www.oreillynet.com for more online content.

    More Perl Articles
    More By O'Reilly Media


     

       

    PERL ARTICLES

    - Perl: A Continuing Look at Hashes and Multid...
    - Perl: Another Round with Hashes
    - Perl Hashes
    - Perl Lists: A Final Look at List::Util
    - Perl Lists: Utilizing List::Util
    - Perl Lists: The Split() Function
    - SQL and CGI with Perl and DBI
    - Perl Lists: More Functions and Operators
    - SELECT Queries and Perl
    - Perl Lists: More on Manipulation
    - Creating a Database with Perl and DBI
    - Perl: Sailing the List(less) Seas
    - Perl and DBI
    - Perl: Concatenating Text and More
    - Perl Text: Quoting Without Quote Marks

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway