projects
/
gitmo/Moose.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
6524110
)
make sure a type constrain name makes sense, properly stringify it and set a default...
John Napiorkowski [Wed, 29 Oct 2008 15:45:39 +0000 (15:45 +0000)]
lib/Moose/Util/TypeConstraints.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Moose/Util/TypeConstraints.pm
b/lib/Moose/Util/TypeConstraints.pm
index
f84b57e
..
86caaa4
100644
(file)
--- a/
lib/Moose/Util/TypeConstraints.pm
+++ b/
lib/Moose/Util/TypeConstraints.pm
@@
-373,9
+373,11
@@
sub _create_type_constraint ($$$;$$) {
. $pkg_defined_in )
if defined $type;
}
+
+ $name = $name ? "$name" : "__ANON__";
my %opts = (
- name => $name || '__ANON__',
+ name => $name,
package_defined_in => $pkg_defined_in,
( $check ? ( constraint => $check ) : () ),