exists $p{birth_date}
or confess 'birth_date is a required attribute';
- my $date = $p{birth_date};
- $class->_coerce_birth_date( \$date );
+ $p{birth_date} = $class->_coerce_birth_date($date );
$class->_validate_birth_date( $date );
$p{shirt_size} = 'l'
shift;
my $date = shift;
- return unless defined $date && ! ref $date;
+ return $date unless defined $date && ! ref $date;
my $dt = $en_parser->parse_datetime($date);
my $self = shift;
if (@_) {
- my $date = shift;
-
- $self->_coerce_birth_date( $date );
+ my $date = $self->_coerce_birth_date( $_[0] );
$self->_validate_birth_date( $date );
+
$self->{birth_date} = $date;
}