Errata

Perl Hacks

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 xi
+3


...supplied the debuggers internal documentation...
->
...supplied the debugger's internal documentation...

########################################

Anonymous    Mar 01, 2007
Printed
Page xi
+3


...supplied the debuggers internal documentation...
->
...supplied the debugger's internal documentation...

########################################

Anonymous    Mar 01, 2007
Printed
Page 5
-1

perlunintro
->
perluniintro

########################################

Anonymous    Mar 01, 2007
Printed
Page 5
-1

perlunintro
->
perluniintro

########################################

Anonymous    Mar 01, 2007
Printed
Page 12
code example at bottom

my $LIST_DIR = "$ENV{HOME}/.vim_extras/
->
my $LIST_DIR = "$ENV{HOME}/.vim_extras/;

########################################

Anonymous    Mar 01, 2007
Printed
Page 12
code example at bottom

my $LIST_DIR = "$ENV{HOME}/.vim_extras/
->
my $LIST_DIR = "$ENV{HOME}/.vim_extras/;

########################################

Anonymous    Mar 01, 2007
Printed
Page 25
+3

...how to execute the tests or edit the editor.
->
...how to execute the tests or exit the editor.

########################################

Anonymous    Mar 01, 2007
Printed
Page 25
+3

...how to execute the tests or edit the editor.
->
...how to execute the tests or exit the editor.

########################################

Anonymous    Mar 01, 2007
Printed
Page 26
-2

In Perl, that's print time() 8>>;.
->
In Perl, that's print time() >> 8;.

########################################

Anonymous    Mar 01, 2007
Printed
Page 26
-2

In Perl, that's print time() 8>>;.
->
In Perl, that's print time() >> 8;.

########################################

Anonymous    Mar 01, 2007
Printed
Page 32
+2

The Hack
->
Hacking the Hack

########################################

Anonymous    Mar 01, 2007
Printed
Page 32
+2

Lazier
->
lazier

########################################

Anonymous    Mar 01, 2007
Printed
Page 32
+2

The Hack
->
Hacking the Hack

########################################

Anonymous    Mar 01, 2007
Printed
Page 32
+2

Lazier
->
lazier

########################################

Anonymous    Mar 01, 2007
Printed
Page 42
code example, line 6

SDL::App#flip
->
SDL::App->flip()

########################################

Anonymous    Mar 01, 2007
Printed
Page 42
code example, line 6

SDL::App#flip
->
SDL::App->flip()

########################################

Anonymous    Mar 01, 2007
Printed
Page 48
-2

the Mozilla family projects
->
the Mozilla family of projects

########################################

Anonymous    Mar 01, 2007
Printed
Page 48
-2

the Mozilla family projects
->
the Mozilla family of projects

########################################

Anonymous    Mar 01, 2007
Printed
Page 50
+4

...try to visit http://perlmonks.com/).
->
...try to visit http://perlmonks.com/.

########################################

Anonymous    Mar 01, 2007
Printed
Page 50
+4

...try to visit http://perlmonks.com/).
->
...try to visit http://perlmonks.com/.

########################################

Anonymous    Mar 01, 2007
Printed
Page 53
+4

Yes, you could look up perldoc -F -X and find a file's size...
->
Yes, you could use the -s operator (see perldoc -f -X for more information) to find a file's size...."

########################################

Anonymous    Mar 01, 2007
Printed
Page 53
+4

Yes, you could look up perldoc -F -X and find a file's size...
->
Yes, you could use the -s operator (see perldoc -f -X for more information) to find a file's size...."

########################################

Anonymous    Mar 01, 2007
Printed
Page 54
first line of code

use FileReadBackwards;
->
use File::ReadBackwards;

########################################

Anonymous    Mar 01, 2007
Printed
Page 54
first line of code

use FileReadBackwards;
->
use File::ReadBackwards;

########################################

Anonymous    Mar 01, 2007
Printed
Page 63
first code

$sth->execute()
->
$sth->execute(@bins)

########################################

Anonymous    Mar 01, 2007
Printed
Page 63
first code

$sth->execute()
->
$sth->execute(@bins)

########################################

Anonymous    Mar 01, 2007
Printed
Page 68
-1

The Code
->
The Hack

########################################

Anonymous    Mar 01, 2007
Printed
Page 68
-1

The Code
->
The Hack

########################################

Anonymous    Mar 01, 2007
Printed
Page 79
+3

intstalling
->
installing

########################################

Anonymous    Mar 01, 2007
Printed
Page 79
+3

intstalling
->
installing

########################################

Anonymous    Mar 01, 2007
Printed
Page 82
+3

$ perl -MDevel::Preload
->
$ perl -MDevel::Presolve

########################################

Anonymous    Mar 01, 2007
Printed
Page 82
+3

$ perl -MDevel::Preload
->
$ perl -MDevel::Presolve

########################################

Anonymous    Mar 01, 2007
Printed
Page 94
code example, line 19

local $CPAN::Config;
->
local %CPAN::Config;

########################################

Anonymous    Mar 01, 2007
Printed
Page 94
code example, line 19

local $CPAN::Config;
->
local %CPAN::Config;

########################################

Anonymous    Mar 01, 2007
Printed
Page 111
code example, 6 lines from bottom

sub get_count :Doc( 'returns the count for all foo objects' )
->
sub get_count :Doc( 'returns the count for all Foo objects' )

########################################

Anonymous    Mar 01, 2007
Printed
Page 111
code example, 6 lines from bottom

sub get_count :Doc( 'returns the count for all foo objects' )
->
sub get_count :Doc( 'returns the count for all Foo objects' )

########################################

Anonymous    Mar 01, 2007
Printed
Page 115
second code example

use Test:More tests => 6;
->
use SecretClass;
use Test:More tests => 6;

########################################

Anonymous    Mar 01, 2007
Printed
Page 115
second code example

use Test:More tests => 6;
->
use SecretClass;
use Test:More tests => 6;

########################################

Anonymous    Mar 01, 2007
Printed
Page 118
first code example

sub UNIVERSAL::Method :ATTR(RAWDATA)
{
my ($package, $symbol, $referent, undef, $arglist) = @_;

my $code = $deparse->coderef2text( $referent );
$code =~ s/{/sub {
my ($self, $arglist) = @_;
/;

no warnings 'redefine';
*$symbol = eval "package $package; $code";
}

1;

->

sub UNIVERSAL::Method :ATTR(RAWDATA)
{
my ($package, $symbol, $referent, undef, $arglist) = @_;

$arglist ||= '';

# count the number of arguments to pull off of @_, including $self
my $count = $arglist =~ tr/,/,/ + 1;
my $code = $deparse->coderef2text( $referent );
my $header = "sub {
my ($self, $arglist) = splice( @_, 0, $count );";
$code =~ s/{/$header
/;

no warnings 'redefine';
*$symbol = eval "package $package; $code";
}

########################################

Anonymous    Mar 01, 2007
Printed
Page 118
first code example

sub UNIVERSAL::Method :ATTR(RAWDATA)
{
my ($package, $symbol, $referent, undef, $arglist) = @_;

my $code = $deparse->coderef2text( $referent );
$code =~ s/{/sub {
my ($self, $arglist) = @_;
/;

no warnings 'redefine';
*$symbol = eval "package $package; $code";
}

1;

->

sub UNIVERSAL::Method :ATTR(RAWDATA)
{
my ($package, $symbol, $referent, undef, $arglist) = @_;

$arglist ||= '';

# count the number of arguments to pull off of @_, including $self
my $count = $arglist =~ tr/,/,/ + 1;
my $code = $deparse->coderef2text( $referent );
my $header = "sub {
my ($self, $arglist) = splice( @_, 0, $count );";
$code =~ s/{/$header
/;

no warnings 'redefine';
*$symbol = eval "package $package; $code";
}

########################################

Anonymous    Mar 01, 2007
Printed
Page 128
code example, line 5

carp 'You can't enlist if you're a minor'
->
carp "You can't enlist if you're a minor"

########################################

Anonymous    Mar 01, 2007
Printed
Page 128
code example, line 5

carp 'You can't enlist if you're a minor'
->
carp "You can't enlist if you're a minor"

########################################

Anonymous    Mar 01, 2007
Printed
Page 146
-2

Fortunately, Devel::Command module makes this much simpler.
->
Fortunately, the Devel::Command module makes this much simpler.

########################################

Anonymous    Mar 01, 2007
Printed
Page 146
-2

Fortunately, Devel::Command module makes this much simpler.
->
Fortunately, the Devel::Command module makes this much simpler.

########################################

Anonymous    Mar 01, 2007
Printed
Page 150
-1

...and assume you have a Makefile when using Module::Build or a Build file
when using ExtUtils::MakeMaker.
->
...and assume you have a Build file when using Module::Build or a Makefile
when using ExtUtils::MakeMaker.

########################################

Anonymous    Mar 01, 2007
Printed
Page 150
-1

...and assume you have a Makefile when using Module::Build or a Build file
when using ExtUtils::MakeMaker.
->
...and assume you have a Build file when using Module::Build or a Makefile
when using ExtUtils::MakeMaker.

########################################

Anonymous    Mar 01, 2007
Printed
Page 173
-1

For each of these cases. you can make your module...
->
For each of these cases you can make your module...

########################################

Anonymous    Mar 01, 2007
Printed
Page 173
-1

For each of these cases. you can make your module...
->
For each of these cases you can make your module...

########################################

Anonymous    Mar 01, 2007
Printed
Page 174
top line

if ($CGI->VERSION >= 3.11)
->
if ($CGI->VERSION => 3.11)

########################################

Anonymous    Mar 01, 2007
Printed
Page 174
top line

if ($CGI->VERSION >= 3.11)
->
if ($CGI->VERSION => 3.11)

########################################

Anonymous    Mar 01, 2007
Printed
Page 189
+1 (occurs twice)

@ISA
->
@INC

########################################

Anonymous    Mar 01, 2007
Printed
Page 189
+1 (occurs twice)

@ISA
->
@INC

########################################

Anonymous    Mar 01, 2007
Printed
Page 203
-1

to allow more introspection and runtime.
->
to allow more introspection at runtime.

########################################

Anonymous    Mar 01, 2007
Printed
Page 203
-1

to allow more introspection and runtime.
->
to allow more introspection at runtime.

########################################

Anonymous    Mar 01, 2007