projects
/
gitmo/Mouse.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Use "undef" and avoid uninitialized warnings when the value we're type checking is...
[gitmo/Mouse.git]
/
lib
/
Mouse
/
TypeRegistry.pm
diff --git
a/lib/Mouse/TypeRegistry.pm
b/lib/Mouse/TypeRegistry.pm
index
3e63cec
..
3a38eb3
100644
(file)
--- 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 },