X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=lib%2FCGI%2FEx%2FTemplate.pod;h=7cdd753a6f40b6adb73d987a25cde897c950160a;hb=d0287461de3f9b5c49ce02b22957022bdc5e87d8;hp=9d2c3c673b93b633b0553eccfeaac294ac80ba76;hpb=48c4840be1f154e262de2c161cb86dc5000dfe47;p=chaz%2Fp5-CGI-Ex diff --git a/lib/CGI/Ex/Template.pod b/lib/CGI/Ex/Template.pod index 9d2c3c6..7cdd753 100644 --- a/lib/CGI/Ex/Template.pod +++ b/lib/CGI/Ex/Template.pod @@ -499,7 +499,7 @@ If the value of a variable is an object, methods can be called using the "." ope [% cet %] - [% cet.dump_parse('1 + 2').replace('\s+', ' ') %] + [% cet.dump_parse_expr('1 + 2').replace('\s+', ' ') %] Would print something like: @@ -795,7 +795,7 @@ Similar to format. Returns a string formatted with the passed pattern. Default =item format [% 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 + the "fmt" virtual method, except that the item is split on newline and each line is processed separately. =item hash @@ -1816,7 +1816,7 @@ file). # The LOAD_PERL directive should be set to 1 [% USE cet = CGI::Ex::Template %] - [%~ cet.dump_parse('2 * 3').replace('\s+', ' ') %] + [%~ cet.dump_parse_expr('2 * 3').replace('\s+', ' ') %] Would print: @@ -2095,7 +2095,7 @@ to the operation of the left hand side and right (clear as mud). In order to not conflict with SET, FOREACH and other operations, this operator is only available in parenthesis. - [% a = 2 %][% a += 3 %] --- [% a %] => --- 5 # is was handled by SET + [% a = 2 %][% a += 3 %] --- [% a %] => --- 5 # is handled by SET [% a = 2 %][% (a += 3) %] --- [% a %] => 5 --- 5 =item C<=> @@ -2104,7 +2104,7 @@ Assignment - right associative. Sets the left-hand side to the value of the rig to not conflict with SET, FOREACH and other operations, this operator is only available in parenthesis. Returns the value of the righthand side. - [% a = 1 %] --- [% a %] => --- 1 # is was handled by SET + [% a = 1 %] --- [% a %] => --- 1 # is handled by SET [% (a = 1) %] --- [% a %] => 1 --- 1 =item C @@ -2440,7 +2440,8 @@ See the USE directive for more information. Default value is Template::Plugin. The base module namespace that template plugins will be looked for. See the USE directive -for more information. +for more information. May be either a single namespace, or an arrayref +of namespaces. =item POST_CHOMP @@ -2676,12 +2677,12 @@ Some notes on the parsing. The following perl can be typed at the command line to view the parsed variable tree: - perl -e 'use CGI::Ex::Template; print CGI::Ex::Template::dump_parse("foo.bar + 2")."\n"' + perl -e 'use CGI::Ex::Template; print CGI::Ex::Template::dump_parse_expr("foo.bar + 2")."\n"' Also the following can be included in a template to view the output in a template: [% USE cet = CGI::Ex::Template %] - [%~ cet.dump_parse('foo.bar + 2').replace('\s+', ' ') %] + [%~ cet.dump_parse_expr('foo.bar + 2').replace('\s+', ' ') %] =head1 SEMI PUBLIC METHODS @@ -2693,6 +2694,10 @@ may be re-implemented by subclasses of CET. =item C +This method allows for returning a Data::Dumper dump of a parsed template. It is mainly used for testing. + +=item C + This method allows for returning a Data::Dumper dump of a parsed variable. It is mainly used for testing. =item C @@ -2851,11 +2856,6 @@ by the pseudo context object and may disappear at some point. Methods by these names implement virtual methods that are more than one line. -=item C - -Used to create a weak reference to self to avoid circular references. (this -is needed by macros) - =back