Errata


Print Print Icon

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



Version Location Description Submitted By
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 241
3rd Paragraph (in the code)

The line of code:

if (SvTRUE(get_sv("MyModule::DEBUG", TRUE")) {...

clearly has too many quotes/is missing a quote around TRUE. Either

if (SvTRUE(get_sv("MyModule::DEBUG", "TRUE")) {...
or
if (SvTRUE(get_sv("MyModule::DEBUG", TRUE)) {...

worked fine for me (using ActivePerl on XP with VC++6 and similar-ish code: testing
whether a variable had been created already in the main package)




Anonymous