added a method to normalize incoming type constraint names and changed how union...
[gitmo/Moose.git] / lib / Moose / Meta / TypeConstraint / Union.pm
index f754834..1473198 100644 (file)
@@ -21,7 +21,7 @@ __PACKAGE__->meta->add_attribute('type_constraints' => (
 sub new { 
     my ($class, %options) = @_;
     my $self = $class->SUPER::new(
-        name     => (join ' | ' => map { $_->name } @{$options{type_constraints}}),
+        name     => (join '|' => map { $_->name } @{$options{type_constraints}}),
         parent   => undef,
         message  => undef,
         hand_optimized_type_constraint => undef,