X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse%2FTypeRegistry.pm;h=3a38eb35462b759c3cf08213ea6b60fe8d08d23f;hb=f5fbe3cced480252b924d64511d69b325d4ddebd;hp=3e63cec48fa45331fcbbb823704206484d069b38;hpb=1be61030b949daee746b57e7135202c27eeb1c2f;p=gitmo%2FMouse.git diff --git a/lib/Mouse/TypeRegistry.pm b/lib/Mouse/TypeRegistry.pm index 3e63cec..3a38eb3 100644 --- a/lib/Mouse/TypeRegistry.pm +++ b/lib/Mouse/TypeRegistry.pm @@ -10,8 +10,8 @@ sub optimized_constraints { Bool => sub { !defined($_) || $_ eq "" || "$_" eq '1' || "$_" eq '0' }, - Undef => sub { 1 }, - Defined => sub { 1 }, + Undef => sub { !defined($_) }, + Defined => sub { defined($_) }, Value => sub { 1 }, Num => sub { 1 }, Int => sub { 1 },