X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-CGI-Ex;a=blobdiff_plain;f=lib%2FCGI%2FEx%2FTemplate.pod;h=fe89aa9bc9fc45c67ca9d0dee6b91b39b2ea3579;hp=7cdd753a6f40b6adb73d987a25cde897c950160a;hb=8abbacc82b52f460bef67c1923ae98873a95e123;hpb=d0287461de3f9b5c49ce02b22957022bdc5e87d8 diff --git a/lib/CGI/Ex/Template.pod b/lib/CGI/Ex/Template.pod index 7cdd753..fe89aa9 100644 --- a/lib/CGI/Ex/Template.pod +++ b/lib/CGI/Ex/Template.pod @@ -789,14 +789,20 @@ This is a filter and is not available via the Text virtual object. =item fmt [% item.fmt('%d') %] + [% item.fmt('%6s') %] + [% item.fmt('%*s', 6) %] Similar to format. Returns a string formatted with the passed pattern. Default pattern is %s. =item format - [% item.format('%d') %] Print the string out in the specified format. It is similar to - the "fmt" virtual method, except that the item is split on newline and each line is - processed separately. + [% item.format('%d') %] + [% item.format('%6s') %] + [% item.format('%*s', 6) %] + +Print the string out in the specified format. It is similar to +the "fmt" virtual method, except that the item is split on newline and each line is +processed separately. =item hash @@ -928,6 +934,8 @@ Virtual Object. =item fmt [% mylist.fmt('%s', ', ') %] + [% mylist.fmt('%6s', ', ') %] + [% mylist.fmt('%*s', ', ', 6) %] Passed a pattern and an string to join on. Returns a string of the values of the list formatted with the passed pattern and joined with the passed string. @@ -1036,6 +1044,8 @@ Virtual Object. =item fmt [% myhash.fmt('%s => %s', "\n") %] + [% myhash.fmt('%4s => %5s', "\n") %] + [% myhash.fmt('%*s => %*s', "\n", 4, 5) %] Passed a pattern and an string to join on. Returns a string of the key/value pairs of the hash formatted with the passed pattern and joined with the passed string.