From 1c8db728a3fb5adb4f0ea876ea1316457700edf8 Mon Sep 17 00:00:00 2001 From: Aaron Trevena Date: Mon, 31 Jul 2006 19:18:01 +0000 Subject: [PATCH] tested and it seems to work git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@519 48953598-375a-da11-a14b-00016c27c3ee --- lib/Maypole.pm | 2 +- lib/Maypole/View/TT.pm | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/Maypole.pm b/lib/Maypole.pm index 56c94e3..d476b56 100644 --- a/lib/Maypole.pm +++ b/lib/Maypole.pm @@ -12,7 +12,7 @@ use URI::QueryParam; use NEXT; use File::MMagic::XS qw(:compat); -our $VERSION = '2.11_pre5'; +our $VERSION = '2.11'; our $mmagic = File::MMagic::XS->new(); # proposed privacy conventions: diff --git a/lib/Maypole/View/TT.pm b/lib/Maypole/View/TT.pm index fb94767..b7a59a2 100644 --- a/lib/Maypole/View/TT.pm +++ b/lib/Maypole/View/TT.pm @@ -286,6 +286,18 @@ truncate, format, escape or encode trivially. A useful selection is included with Template Toolkit and they can also be found on CPAN or can be written easily. See L. +TT provides stderr and stdout filters, which allow you to write handy macros +like this one to output debug information to your web server log, etc : + +=over 4 + +[% MACRO debug_msg(text) + FILTER stderr; "[TT debug_msg] $text\n"; END; +%] + +=back + + TT Macros allow you to reuse small blocks of content, directives, etc. The MACRO directive allows you to define a directive or directive block which is then evaluated each time the macro is called. Macros can be passed named parameters -- 2.39.2