NAME

Solstice::Compiler::View - Compiles a View and Template into a perl structure

SYNOPSIS

my $compiler = Solstice::Compiler::View->new();
my $paint_method = $compiler->makePaintMethod($view_object);

DESCRIPTION

This module will take a Solstice::View object and the HTML::Template template that it specifies, and create a paint method for the view.

We do this because painting a template is very expensive... on complicated screens we were seeing %50 of page creation time in template painting.

The compiled paint methods will end up in the path specified in the compiled_template_path in the app's configuration file. If there is no path specified, no compiled view will be made.

The goal of this module to support the syntax of HTML::Template, at least for some limited uses. It is heavily biased towards the parts of HTML::Template that we use, it is very possible that there will be bugs in other parts of the syntax. We will try to fix such bugs, provided they don't have a noticable impact on the performance of the compiled paint method.

Very important note - this will not work for modules that choose their templates dynamically. You should change those so views are chosen dynamically, or disable compiled views for that application.

Methods

new()

constructor.

makePaintMethod($package_name)

Takes a package name, and creates a paint method based on the template it uses.

AUTHOR

Catalyst Group, <catalyst@u.washington.edu>

VERSION

$Revision: 2944 $

COPYRIGHT

Copyright 1998-2007 Office of Learning Technologies, University of Washington

Licensed under the Educational Community License, Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.opensource.org/licenses/ecl1.php

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.