From: Dave Rolsky Date: Sun, 7 Dec 2008 18:50:19 +0000 (+0000) Subject: Fix some unintended bugs in the "standard" P5 code. X-Git-Tag: 0.63~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1900b4d14566f72ba9bbde4855df4bde98d0d9d5;p=gitmo%2FMoose.git Fix some unintended bugs in the "standard" P5 code. --- diff --git a/lib/Moose/Unsweetened.pod b/lib/Moose/Unsweetened.pod index 8f2b5be..1e00db2 100644 --- a/lib/Moose/Unsweetened.pod +++ b/lib/Moose/Unsweetened.pod @@ -108,18 +108,15 @@ helpers like C. exists $p{birth_date} or confess 'birth_date is a required attribute'; - $p{birth_date} = $class->_coerce_birth_date($date ); - $class->_validate_birth_date( $date ); + $p{birth_date} = $class->_coerce_birth_date( $p{birth_date} ); + $class->_validate_birth_date( $p{birth_date} ); $p{shirt_size} = 'l' unless exists $p{shirt_size}: $class->_validate_shirt_size( $p{shirt_size} ); - my %self = map { $_ => $p{$_} } qw( name shirt_size ); - $self{birth_date} = $date; - - return bless \%self, $class; + return bless \%p, $class; } sub _validate_name {