Embedding Perl in HTML with Mason
by Ken Williams, Dave Rolsky
This errata page lists errors outstanding in the most recent printing.
If you have technical questions or error reports, you can send them to
booktech@oreilly.com. Please specify the printing date of your copy.
This page was updated February 24, 2006.
Here's a key to the markup:
[page-number]: serious technical mistake
{page-number}: minor technical mistake
: important language/formatting problem
(page-number): language change or minor formatting problem
?page-number?: reader question or request for clarification
Confirmed errors:
[12] 1st paragraph in Template Toolkit section;
My book is a First Edition printed in October 2002.
This is nitpicky but...
The second sentence mentions the FILTER tag twice, when it seems that it should
probably only be mentioned once.
AUTHOR: This is correct. FILTER should just be included in the list of "advanced
tags". However, this is not a serious technical mistake, it's a minor
language mistake.
(21) middle of page;
The code:
You have <% $cd_count %> cd<% $cd_count != 1 ? 's': '' %>
is missing the period (.) after the final closing %> tag.
{23} Last code example;
The first line of the <%perl> block should read:
my @words = $sentence =~ /\b(\S+)\b/g;
The code in the book is missing the '$' sigil on the variable.
(25) 4th paragraph;
The second to last line of the example in paragraph 4:
esethat ordsway areyay inyay Igpay Atinlay.
should instead be:
esethay ordsway areyay inyay Igpay Atinlay.
to be an accurate translation. The word "these" is "esethay" in Pig Latin.
AUTHOR: Indeed, my pig latin was mistaken ;)
(26) first paragraph of section "Other Named Blocks";
"most of them contain plan Perl"
should read
"most of them contain plain Perl".
{27} First line;
It is currently <% $temperature %> degrees.
should be:
It is currently <% $temp %> degrees.
{46} second line;
The name "view_user.mas" somehow got turned in one instance into "view_user.max", I
think somewhere in the editing process. It should be "view_user.mas" throughout this
section.
{73} 2nd paragraph;
"You should also remember that variables defined via an <%args> block are not visible
in a <%shared> block, meaning that the only access to arguments inside a shared block
is via the %ARGS hash or one of the request object methods such as request_args."
It's not true that you can access args via %ARGS in a shared block. You can only
access args via $m->request_args.
{74} second line of example 5-3 (/autohandler);
<& $m->call_next &>
should be:
% $m->call_next;
As written the example would attempt to call a component as specified by the return
value of $m->call_next, which probably isn't intended.
(110) Last paragraph;
This paragraph should be intended to match those above it, as it applies to the
previous list item.
(129) First comment in first code block;
Sometimes we may want to path in a query
should read:
Sometimes we may want to pass in a query
(147) top half of page;
The site admin tag is missing its closing '>'.
{190} Example 11-2;
There are two errors in this code block:
In the Cache::FileCache->new line, there is a missing { before namespace.
Add 'use Cache::FileCache' to the <%once> section.
(157) middle of page;
The closing tag incorrectly appears as