From a86c34df8421f292315425f37a6d69a597fc0fc1 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 11 Oct 2006 04:15:21 +0000 Subject: [PATCH] Added 5 more tests for Style's process method, checking for meta tags for default processing and for meta tags when cache busting is enabled. Fixed a bug where the default meta tag Generator did not contain the WebGUI version. Added lots of POD to the Style module detailing how meta tags are handled in various cases. --- lib/WebGUI/Session/Style.pm | 27 +++++++++++-- t/Session/Style.t | 77 ++++++++++++++++++++++++++++++++++++- 2 files changed, 99 insertions(+), 5 deletions(-) diff --git a/lib/WebGUI/Session/Style.pm b/lib/WebGUI/Session/Style.pm index 575415e9a..209af426b 100644 --- a/lib/WebGUI/Session/Style.pm +++ b/lib/WebGUI/Session/Style.pm @@ -20,6 +20,7 @@ use Tie::CPHash; use WebGUI::International; use WebGUI::Macro; use WebGUI::Asset::Template; +use WebGUI; =head1 NAME @@ -71,6 +72,7 @@ sub DESTROY { =head2 generateAdditionalHeadTags ( ) Creates tags that were set using setLink, setMeta, setScript, extraHeadTags, and setRawHeadTags. +Macros are processed in the tags if processed by this method. =cut @@ -240,7 +242,12 @@ sub sent { =head2 setLink ( url, params ) -Sets a tag into the of this rendered page for this page view. This is typically used for dynamically adding references to CSS and RSS documents. +Sets a tag into the of this rendered page for this page +view. This is typically used for dynamically adding references to CSS +and RSS documents. Tags are normally cached until the $style->sent +flag is set to be true. If this method is called after that sent is +true, then the tag will be sent immediately, but will not be processed +for macros. =head3 url @@ -291,7 +298,10 @@ sub setPrintableStyleId { =head2 setMeta ( params ) -Sets a tag into the of this rendered page for this page view. +Sets a tag into the of this rendered page for this +page view. Tags are normally cached until the $style->sent flag is +set to be true. If this method is called after that sent is true, +then the tag will be sent immediately, but will not be processed =head3 params @@ -316,7 +326,11 @@ sub setMeta { =head2 setRawHeadTags ( tags ) -Sets data to be output into the of the current rendered page for this page view. +Sets data to be output into the of the current rendered page +for this page view. Tags are normally cached until the $style->sent +flag is set to be true. If this method is called after that sent is +true, then the tag will be sent immediately, but will not be processed +for macros. =head3 tags @@ -336,7 +350,12 @@ sub setRawHeadTags { =head2 setScript ( url, params ) -Sets a