projects
/
gitmo/Mouse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
5c5a61e
)
Type coercions should be added to the front of the list in
wu-lee [Thu, 2 Apr 2009 14:13:46 +0000 (15:13 +0100)]
$COERCE_KEYS{$name}, not the back. This ensures they are checked in
the correct order (as supplied in the declaration).
lib/Mouse/Util/TypeConstraints.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Mouse/Util/TypeConstraints.pm
b/lib/Mouse/Util/TypeConstraints.pm
index
3ed075d
..
650bfca
100644
(file)
--- a/
lib/Mouse/Util/TypeConstraints.pm
+++ b/
lib/Mouse/Util/TypeConstraints.pm
@@
-154,7
+154,7
@@
sub coerce {
}
}
- push @{ $COERCE_KEYS{$name} }, $type;
+ unshift @{ $COERCE_KEYS{$name} }, $type;
$COERCE{$name}->{$type} = $code;
}
}