X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FTutorial%2FCatalystBasics.pod;h=7096679d5957c06440cf3bf5a6af81def9a07a43;hp=e944276addd26a5b4db05c14362016a475527f3a;hb=c9b77c06a0de97f1d6e9a66091e693a637578357;hpb=d532d3540a37e6efc518ffa0bd8fd0e240453240 diff --git a/lib/Catalyst/Manual/Tutorial/CatalystBasics.pod b/lib/Catalyst/Manual/Tutorial/CatalystBasics.pod index e944276..7096679 100644 --- a/lib/Catalyst/Manual/Tutorial/CatalystBasics.pod +++ b/lib/Catalyst/Manual/Tutorial/CatalystBasics.pod @@ -886,7 +886,8 @@ that C be added to the list of plugins in C. It also allowed you to add "dump_info=1" (precede with "?" or "&" depending on where it is in the URL) to I the debug screen at the end of the Catalyst request processing cycle. However, it was more -difficult to extend the C mechanism, and is now deprecated. +difficult to extend than the C mechanism, and is now +deprecated. =item * @@ -970,13 +971,16 @@ Then open C in your editor and enter: [% # First initialize a TT variable to hold a list. Then use a TT FOREACH -%] [% # loop in 'side effect notation' to load just the last names of the -%] - [% # authors into the list. Note that we make a bogus assignment to the -%] - [% # 'unused' vbl to avoid printing the size of the list after each push. -%] + [% # authors into the list. Note that the 'push' TT vmethod does not -%] + [% # a value, so nothing will be printed here. But, if you have something -%] + [% # in TT that does return a method and you don't want it printed, you -%] + [% # can: 1) assign it to a bogus value, or 2) use the CALL keyword to -%] + [% # call it and discard the return value. -%] [% tt_authors = [ ]; - unused = tt_authors.push(author.last_name) FOREACH author = book.authors %] + tt_authors.push(author.last_name) FOREACH author = book.authors %] [% # Now use a TT 'virtual method' to display the author count in parens -%] ([% tt_authors.size %]) - [% # Use another vmethod to join & print the names with comma separators -%] + [% # Use another TT vmethod to join & print the names & comma separators -%] [% tt_authors.join(', ') %]