HTML::FormHandler::Render::WithTT(3pm)

HTML::FormHandler::Render::WithTT3pm

Tt rendering

Usage

A rendering role for HTML::FormHandler that allows rendering using Template::Toolkit

   package MyApp::Form;
   use HTML::FormHandler::Moose;
   extends 'HTML::FormHandler';
   with 'HTML::FormHandler::Render::WithTT';
   sub build_tt_template { 'user_form.tt' }
   sub build_tt_include_path { ['root/templates'] }
   ....< define form >....
   my $form = MyApp::Form->new(
   $form->tt_render;

If you want to render with TT, you don't need this role. Just use one of the TT form templates provided, form.tt or form_in_one.tt. If you use this role to render, you are using two different TT engines, with different sets of variables, etc, which doesn't make much sense.

This is mainly useful as a testing aid and an example of using the sample templates.

Version

version 0.40068

Overview

Uses 'tt_render' instead of 'render' to allow using both TT templates and the built-in rendering.

Releases

7 releases since Debian 7 (Wheezy); the text changed 4 times.

  1. 7
  2. 8
  3. 9
  4. 10–11
  5. 12–13

Author

FormHandler Contributors - see HTML::FormHandler

From libhtml-formhandler-perl 0.40068-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.