X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=lib%2FCGI%2FEx%2FTemplate.pod;h=83545c41b1845b080255d7bc0e79cefb81b029a0;hb=d710d6cd21be21c0ab2df3566c2bd61d9015cac6;hp=cd7dd094f9366e6d0410f6658e8cf051801b92e4;hpb=d2b7c937e86e6e8c4b4193e9f4a8da075919b4fd;p=chaz%2Fp5-CGI-Ex diff --git a/lib/CGI/Ex/Template.pod b/lib/CGI/Ex/Template.pod index cd7dd09..83545c4 100644 --- a/lib/CGI/Ex/Template.pod +++ b/lib/CGI/Ex/Template.pod @@ -399,13 +399,8 @@ CET has its own built in recursive grammar system. =item There are no references. -There was in initial beta tests, but it was decided to remove the little used feature. - -It makes it the same as - - [% obj.method("foo") %] - -This is removed in CET. +There were in initial beta tests, but it was decided to remove the little used feature which +took a length of code to implement. =item The DEBUG directive is more limited. @@ -416,7 +411,8 @@ are on rather than a general line range. =item There is no ANYCASE configuration item. -There was in initial beta tests, but it was dropped in favor of consistent parsing syntax. +There was in initial beta tests, but it was dropped in favor of consistent parsing syntax (and +a minimal amount of speedup). =item There is no V1DOLLAR configuration item. @@ -751,7 +747,8 @@ object (except for true filters such as eval and redirect). =item '0' - [% item = 'foo' %][% item.0 %] Returns self. Allows for scalars to mask as arrays. + [% item = 'foo' %][% item.0 %] Returns self. Allows for scalars to mask as arrays (scalars + already will, but this allows for more direct access). =item as @@ -797,7 +794,8 @@ This is a filter and is not available via the Text virtual object. =item format - [% item.format('%d') %] Print the string out in the specified format. Each line is + [% item.format('%d') %] Print the string out in the specified format. It is similar to + the "as" virtual method, except that the item is split on newline and each line is processed separately. =item hash @@ -847,7 +845,7 @@ Note: This filter is not available as of TT2.15. =item remove - [% item.remove("\s+") %] Same as remove - but is global and replaces with nothing. + [% item.remove("\s+") %] Same as replace - but is global and replaces with nothing. =item redirect @@ -868,13 +866,13 @@ This is a filter and is not available via the Text virtual object. [% item.replace("\s+", " ") %] Globally replace all space with   - [% item.replace("foo", "bar", 0) Replace only the first instance of foo with bar. + [% item.replace("foo", "bar", 0) %] Replace only the first instance of foo with bar. [% item.replace("(\w+)", "($1)") %] Surround all words with parenthesis. =item search - [% item.search("(\w+)" %] Tests if the given pattern is in the string. + [% item.search("(\w+)") %] Tests if the given pattern is in the string. =item size @@ -2195,7 +2193,7 @@ Collapse adjacent whitespace to a single space. The "=" is used to indicate CHO Hello. - [%- "Hi." -%] + [%= "Hi." =%] Howdy. @@ -2209,7 +2207,7 @@ Remove all adjacent whitespace. The "~" is used to indicate CHOMP_GREEDY. Hello. - [%- "Hi." -%] + [%~ "Hi." ~%] Howdy. @@ -2350,9 +2348,9 @@ Allow for passing in TT style filters. my $str = q{ [% a = "Hello" %] - 1([% a | filter1 %]) - 2([% a | filter2 %]) - 3([% a | filter3 %]) + 1 ([% a | filter1 %]) + 2 ([% a | filter2 %]) + 3 ([% a | filter3 %]) }; my $obj = CGI::Ex::Template->new(FILTERS => $filters); @@ -2360,9 +2358,9 @@ Allow for passing in TT style filters. Would print: - (11111) - (22222) - (33333) + 1 (11111) + 2 (22222) + 3 (33333) Filters passed in as an arrayref should contain a coderef and a value indicating if they are dynamic or static (true meaning dynamic). The