Fix typo in comment
[gitmo/Moose.git] / lib / Moose / Meta / TypeConstraint / Union.pm
index 08ac2de..9479ccf 100644 (file)
@@ -7,7 +7,8 @@ use metaclass;
 
 use Moose::Meta::TypeCoercion::Union;
 
-our $VERSION   = '0.55';
+our $VERSION   = '0.59';
+$VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
 use base 'Moose::Meta::TypeConstraint';
@@ -20,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 '|' => sort map { $_->name } @{$options{type_constraints}}),
         parent   => undef,
         message  => undef,
         hand_optimized_type_constraint => undef,