Errata

Advanced Perl Programming

Errata for Advanced Perl Programming

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.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

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

Version Location Description Submitted by Date submitted
Printed Page 38
Paragraph "Doing things at the end with DESTROY

The first example shown in "Doing things at the end with DESTROY" does not work
(neither in Perl 5.6.1 nor in 5.8.6). The DESTROY block gets never called.

It works, however, in this slightly modified way:

sub do_later (&) {
bless [shift], "Do::Later"; # code ref is enclosed in array ref
}

sub Do::Later::DESTROY { # take elem #0 of array ref instead
$_[0]->[0]->(); # of code ref directly
}

It seems that Perl doesn't like to call destructors on objects which are based upon
code refs.

Anonymous   
Printed Page 114
Code sample

Surely
[% FOREACH item = news.items %]
should be
[% FOREACH item = rss.items %]

and
[% MACRO RSSBox(url) USE rss = XML.RSS.URL(url) %]
isn't right, as you're specifying the BLOCK as the macro, not just the USE.

Anonymous   
Printed Page 133
centre

spelling: "seperate"

Peter  Oct 25, 2016 
210
Code below 4th paragraph

The line:

use HTTP::Headers;

should be:

use HTTP::Status;

Justin Burket  Feb 18, 2010