From: Shawn M Moore Date: Tue, 10 Jun 2008 02:08:50 +0000 (+0000) Subject: Fix type_constraint always being set to undef X-Git-Tag: 0.04~73 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c021207d4b8eb14c8c6f29af37bfbdd475937343;p=gitmo%2FMouse.git Fix type_constraint always being set to undef --- diff --git a/lib/Mouse/Attribute.pm b/lib/Mouse/Attribute.pm index 2076297..0bc6a20 100644 --- a/lib/Mouse/Attribute.pm +++ b/lib/Mouse/Attribute.pm @@ -147,7 +147,8 @@ sub create { $args{handles} = { $self->_canonicalize_handles($args{handles}) } if $args{handles}; - $args{type_constraint} = delete $args{isa}; + $args{type_constraint} = delete $args{isa} + if exists $args{isa}; my $attribute = $self->new(%args, name => $name, class => $class); my $meta = $class->meta;