From: Yuval Kogman Date: Sat, 18 Apr 2009 17:47:19 +0000 (+0200) Subject: make Item a subtype of Any for sorting X-Git-Tag: 0.75~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3054a5c9ccd5371d18f2fc842244f0adf7834604;p=gitmo%2FMoose.git make Item a subtype of Any for sorting --- diff --git a/lib/Moose/Util/TypeConstraints.pm b/lib/Moose/Util/TypeConstraints.pm index 4872917..2f4f1c4 100644 --- a/lib/Moose/Util/TypeConstraints.pm +++ b/lib/Moose/Util/TypeConstraints.pm @@ -611,7 +611,7 @@ $_->make_immutable( ); type 'Any' => where {1}; # meta-type including all -type 'Item' => where {1}; # base-type +subtype 'Item' => as 'Any'; # base-type subtype 'Undef' => as 'Item' => where { !defined($_) }; subtype 'Defined' => as 'Item' => where { defined($_) };