The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

PerlPoint::Template::TT2 - beta of a PerlPoint template processor for Template Toolkit 2 layouts

VERSION

This manual describes beta version 0.01.

SYNOPSIS

DESCRIPTION

METHODS

new()

Parameters:

class

The class name.

Returns: the new object.

Example:

     # start page
     $result.="\n\n<html>\n\n";

     # begin header
     $result.="\n\n<head>\n\n";

     # header contents: this was added to the traditional list of template files
     $result.=$me->_processTemplate(join('/', $tdir, $options->{$toc ? 'header_toc_template' : 'header_template'}), $toc ? 1 : $params{page});

     # complete header
     $result.="\n\n</head>\n\n";

     # begin body
     $result.="\n\n<body>\n\n";

     # now the body contents: start with top part
     $result.=$me->_processTemplate(join('/', $tdir, $options->{$toc ? 'top_toc_template' : 'top_template'}), $toc ? 1 : $params{page});

     # add navigation, if necessary
     $result.=$me->_processTemplate(join('/', $tdir, $options->{$toc ? 'nav_toc_template' : 'nav_template'}), $toc ? 1 : $params{page})
       if exists $options->{$toc ? 'nav_toc_template' : 'nav_template'};

     # include data (for TOCs, make sure not to add a standard TOC if the tree applet is used
     # - this should be more generic in case users use other methods ...)
     $result.=$toc ? $result=~/<applet code="TreeApp\.class" codebase=/ ? '' : $me->_toc() : $params{data};

     # add bottom navigation, if necessary
     $result.=$me->_processTemplate(join('/', $tdir, $options->{$toc ? 'nav_toc_template' : 'nav_template'}), $toc ? 1 : $params{page})
       if exists $options->{$toc ? 'nav_toc_template' : 'nav_template'};

     # finally, add the bottom part
     $result.=$me->_processTemplate(join('/', $tdir, $options->{$toc ? 'bottom_toc_template' : 'bottom_template'}), $toc ? 1 : $params{page});

     # close the body
     $result.="\n\n</body>\n\n";

     # and complete the page
     $result.="\n\n</html>\n\n";
           # build file name
           my $filename=join('', "$options->{targetdir}/$options->{prefix}-", (fileparse($template, qr(\.[^.]+)))[0], "-$params{page}$options->{suffix}");
           warn "= PAGE SUPPLEMENT =====> $filename\n";

           # write file
           open(SUPPFILE, ">$filename") or die qq([Fatal] Could not open output file "$filename": $!.\n);
           print SUPPFILE $string;
           close(SUPPFILE);
          }
       }

NOTES

SEE ALSO

SUPPORT

A PerlPoint mailing list is set up to discuss usage, ideas, bugs, suggestions and translator development. To subscribe, please send an empty message to perlpoint-subscribe@perl.org.

If you prefer, you can contact me via perl@jochen-stenzel.de as well.

AUTHOR

Copyright (c) Jochen Stenzel (perl@jochen-stenzel.de), 2005-2006. All rights reserved.

This module is free software, you can redistribute it and/or modify it under the terms of the Artistic License distributed with Perl version 5.003 or (at your option) any later version. Please refer to the Artistic License that came with your Perl distribution for more details.

The Artistic License should have been included in your distribution of Perl. It resides in the file named "Artistic" at the top-level of the Perl source tree (where Perl was downloaded/unpacked - ask your system administrator if you dont know where this is). Alternatively, the current version of the Artistic License distributed with Perl can be viewed on-line on the World-Wide Web (WWW) from the following URL: http://www.perl.com/perl/misc/Artistic.html

DISCLAIMER

This software is distributed in the hope that it will be useful, but is provided "AS IS" WITHOUT WARRANTY OF ANY KIND, either expressed or implied, INCLUDING, without limitation, the implied warranties of MERCHANTABILITY and FITNESS FOR A PARTICULAR PURPOSE.

The ENTIRE RISK as to the quality and performance of the software IS WITH YOU (the holder of the software). Should the software prove defective, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

IN NO EVENT WILL ANY COPYRIGHT HOLDER OR ANY OTHER PARTY WHO MAY CREATE, MODIFY, OR DISTRIBUTE THE SOFTWARE BE LIABLE OR RESPONSIBLE TO YOU OR TO ANY OTHER ENTITY FOR ANY KIND OF DAMAGES (no matter how awful - not even if they arise from known or unknown flaws in the software).

Please refer to the Artistic License that came with your Perl distribution for more details.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 330:

=pod directives shouldn't be over one line long! Ignoring all 4 lines of content

Around line 380:

=pod directives shouldn't be over one line long! Ignoring all 9 lines of content