Errata

Perl for Web Site Management

Errata for Perl for Web Site Management

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Printed
Page 73
two-thirds of the way down the page

In the example of how name=value pairs can be entered in CGI.pm's offline mode, the
multiword values need to be enclosed by double quotes.

Before:

Name=John Callender
Address=1234 Any St.

After:

Name="John Callender"
Address="1234 Any St."

Anonymous   
Printed
Page 85
About three-fourths of the way down the page.

About three-fourths of the way down the page is a line that talks about updating the
code in fix_links.plx. The actual script being updated is rename.plx.

Before:

That one's my personal favorite, so let's update
the code in fix_links.plx to use that version.

After:

That one's my personal favorite, so let's update
the code in rename.plx to use that version.

Anonymous   
Printed
Page 119
About halfway down the page.

About halfway down the page is a sentence that speaks about assigning a string to
$exhibit{$co_name}. The string is actually being assigned to $listing{$co_name}.

Before:

...that's the place in the &parse_exhibitor subroutine
where we assign the multiline here-document-quoted string
to $exhibit{$co_name}.

After:

...that's the place in the &parse_exhibitor subroutine
where we assign the multiline here-document-quoted string
to $listing{$co_name}.

Anonymous   
Printed
Page 152
About three-fourths of the way down the page.

About three-fourths of the way down the page is a comment about assigning an "array"
to the @categories variable. Technically, the stuff being assigned should be referred
to as a "list", not an "array".

Before:

Without this special behavior of split's, the array assigned
to @categories...

After:

Without this special behavior of split's, the list assigned
to @categories...

Anonymous   
Printed
Page 172
Four lines up from the bottom of the page.

Four lines up from the bottom of the page, the "it" in the sentence is ambiguous (see
below).

Before:

The  makes it so that the expression can no longer
match, since it doesn't have a word boundary between Wal and nuts.

After:

The  makes it so that the expression can no longer
match, since the string doesn't have a word boundary between
Wal and nuts.

Anonymous   
Printed
Page 181
under "authuser"

text reads "If you are using
basic 'ecHTTP authentication...". That's a typo, it
should be "If you are using basic HTTP authentication ..."

Anonymous   
Printed
Page 202
About a third of the way up from the bottom of the page

About a third of the way up from the bottom of the page, the variable having 1900
subtracted from it has been misnamed.

Before:

It also subtracts 1900 from $year.

After:

It also subtracts 1900 from $yr.

Anonymous   
Printed
Page 218
About halfway down the page

Example 10-1 contains a variable called $depth in its configuration section; that
line shouldn't actually appear in the script until Example 10-2.

Before:

my $depth = 20; # how deep to go in reporting top N pages

After:

(Entire line should be deleted.)

Anonymous   
Printed
Page 218
two-thirds of the way down the page

Example 10-1 will not compile successfully as given. This is the result of a typo in
the last line of the "script-wide my variable declaration" that appears about two-thirds
of the way down the page. Specifically, the $agent variable should be given as %agent.

Before:

%last_seconds, %page_sequence, %referer, $agent);

After:

%last_seconds, %page_sequence, %referer, %agent);

Anonymous   
Printed
Page 280
about halfway down the page

In certain circumstances, the link-checking script in Example 11-4 can expose a bug in
the HTTP::Response module that causes the script to die. The problem can be fixed by
replacing the next-to-the-last line in the check_url subroutine (which occurs just over
halfway down the page) with the four lines shown below:

Before:

my $actual = $response->base; # in case we were redirected

After:

my $actual;
if ($success) {
$actual = $response->base; # redirected?
}

Anonymous   
Printed
Page 281
about halfway down the page

When run on a site that uses frames, the link checker in Example 11-4 fails to process
links of type "frame", and thus fails to properly spider the site. This can be corrected
by modifying the following line, from the middle of page 281, just before the TARGET:
label, to add '|frame' to the regular expression.

Before:

if ($tag =~ /^(a|img)$/) {

After:

if ($tag =~ /^(a|img|frame)$/) {

Anonymous   
Printed
Page 286
about two-thirds of the way down the page

About two-thirds of the way down the page, a line is given from Example 11-4. This is
the line that was replaced with four new lines, as described previously in the errata
listing for page 280. The same four lines need to be given here, with some minor wording
changes in the description of what's going on.

Anonymous   
Printed
Page 288
last line on the page

The last line on the page gives a line from Example 11-4. It is the line that was
modified in the errata listing for page 281, so the regular expression should actually
look like: /^(a|img|frame)$/ (the |frame part needs to be added at the end).

Anonymous   
Printed
Page 318
last line on the page

The last line on the page is a line from example 13-1 that reads: close SWISH or die
"can't close SWISH: $!";. That entire line should be deleted from the script. It is a
legacy from an earlier version of the example, in which the Swish output was read via
a filehandle, rather than via backticks.

Anonymous   
Printed
Page 370
near the bottom of the page

Near the bottom of the page, the use vars line near the beginning of Example 16-3
fails to list the $VERSION variable. This causes the script to die with a compilation
error. To correct it, $VERSION must be added to the list of variables.

Before:

use vars qw(@ISA @EXPORT @EXPORT_OK);

After:

use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);

Anonymous   
Printed
Page 445

example: N/A
change:
About a third of the way down the page, the text refers to the
Make_page.pm module, saying it is the same module that was seen in an
earlier chapter. In fact, the module in the earlier chapter was called
Page.pm; it was given in Example 16-3. The Page.pm module being used in
Example 19-3 differs in several respects from that earlier example, and
those differences should have been noted in the text.

Before:

One thing you'll notice about register.cgi is that it uses the same
Make_page.pm module we saw in an earlier chapter to create a simple
template system. That Make_page.pm module has been placed...

After:

One thing you'll notice about register.cgi is that it uses a module called
Make_page.pm to create a simple template system. That module is not shown
here, but it is very similar to the Page.pm module given in Example 16-3.
This Make_page.pm module needs to be placed...

Anonymous