From: Marcus Ramberg Date: Wed, 30 Mar 2005 11:54:06 +0000 (+0000) Subject: 0.09 release. X-Git-Tag: v0.13~18 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2599ee6f2dcee6a304ddb14a39eb8e1c69ff1118;hp=70a5ab0ab9abfef51d9248641bc68a973f8a3c99;p=catagits%2FCatalyst-View-TT.git 0.09 release. --- diff --git a/Changes b/Changes index 0ddb15a..462a59d 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,7 @@ Revision history for Perl extension Catalyst::View::TT. 0.09 Wed Mar 29 13:47:00 2005 - Don't override user-set charset/content-type - Cleaned up the content-type we set. + - Updated README to current POD to current POD 0.08 Wed Mar 29 12:22:00 2005 - changed order of stash so stash can override c/base/name - fixed some typos diff --git a/MANIFEST b/MANIFEST index 57b27b0..642334a 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,4 +1,3 @@ -Catalyst-View-TT-0.08.tar.gz Changes lib/Catalyst/Helper/View/TT.pm lib/Catalyst/View/TT.pm diff --git a/META.yml b/META.yml index 9c9c771..ce15a74 100644 --- a/META.yml +++ b/META.yml @@ -1,7 +1,7 @@ # http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: Catalyst-View-TT -version: 0.08 +version: 0.09 version_from: lib/Catalyst/View/TT.pm installdirs: site requires: diff --git a/README b/README index 3d9a445..7b94ee1 100644 --- a/README +++ b/README @@ -14,24 +14,53 @@ SYNOPSIS 1; + # Meanwhile, maybe in an '!end' action $c->forward('MyApp::View::TT'); DESCRIPTION This is the "Template" view class. Your subclass should inherit from - this class. If you want to override TT config settings, you can do it - there by setting __PACKAGE__->config->{OPTION} as shown in the synopsis. - Of interest might be EVAL_PERL, which is disabled by default, and - LOAD_TEMPLATES, which is set to use the provider. + this class. The plugin renders the template specified in + "$c->stash->{template}" or "$c->request->match". The template variables + are set up from the contents of "$c->stash", augmented with "base" set + to "$c->req->base", "c" to $c and "name" to "$c->config->{name}". The + output is stored in "$c->response->output". + + If you want to override TT config settings, you can do it there by + setting "__PACKAGE__->config->{OPTION}" as shown in the synopsis. Of + interest might be "EVAL_PERL", which is disabled by default, and + "LOAD_TEMPLATES", which is set to use the provider. If you want to use EVAL perl, add something like this: __PACKAGE__->config->{EVAL_PERL} = 1; __PACKAGE__->config->{LOAD_TEMPLATES} = undef; + If you have configured Catalyst for debug output "Catalyst::View::TT" + will enable profiling of template processing (using "Template::Timer". + This will cause HTML comments will get embedded in the output from your + templates, such as: + + + + + + + + .... + + + + You can supress template profiling when debug is enabled by setting: + + __PACKAGE__->config->{CONTEXT} = undef; + METHODS process - Renders the template specified in $c->stash->{template} or - $c->request->match to $c->response->output. + Renders the template specified in "$c->stash->{template}" or + "$c->request->match". Template variables are set up from the contents of + "$c->stash", augmented with "base" set to "$c->req->base", "c" to $c and + "name" to "$c->config->{name}". Output is stored in + "$c->response->output". config This allows your view subclass to pass additional settings to the TT @@ -41,7 +70,7 @@ SEE ALSO Catalyst. AUTHOR - Sebastian Riedel, "sri@cpan.org" Marcus Ramberg + Sebastian Riedel, "sri@cpan.org" Marcus Ramberg, "mramberg@cpan.org" COPYRIGHT This program is free software, you can redistribute it and/or modify it diff --git a/lib/Catalyst/View/TT.pm b/lib/Catalyst/View/TT.pm index 115aa62..a2e8a81 100644 --- a/lib/Catalyst/View/TT.pm +++ b/lib/Catalyst/View/TT.pm @@ -6,7 +6,7 @@ use Template; use Template::Timer; use NEXT; -our $VERSION = '0.08'; +our $VERSION = '0.09'; __PACKAGE__->mk_accessors('template');