local $Carp::CarpLevel = $Carp::CarpLevel + 1;
- $birth_date->isa('DateTime') )
+ $birth_date->isa('DateTime')
or confess 'birth_date must be a DateTime object';
}
Also, did you spot the (intentional) bug?
It's in the C<_validate_birth_date()> method. We should check that
-that value in C<$birth_date> is actually defined and object before we
-go and call C<isa()> on it! Leaving out those checks means our data
+the value in C<$birth_date> is actually defined and an object before
+we go and call C<isa()> on it! Leaving out those checks means our data
validation code could actually cause our program to die. Oops.
Note that if we add a superclass to Person we'll have to change the
same way as Moose. With Moose, it's easy to write a MooseX module to
replace or extend a piece of built-in functionality.
+Moose is a complete OO package in and of itself, and is part of a rich
+ecosystem of extensions. It also has an enthusiastic community of
+users, and is being actively maintained and developed.
+
=head1 AUTHOR
Dave Rolsky E<lt>autarch@urth.orgE<gt>