projects
/
gitmo/Mouse.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
(Re-)organize Method Accessor, implementing has ... reader => $r, accessor => $a...
[gitmo/Mouse.git]
/
lib
/
Mouse
/
Meta
/
TypeConstraint.pm
diff --git
a/lib/Mouse/Meta/TypeConstraint.pm
b/lib/Mouse/Meta/TypeConstraint.pm
index
51b0867
..
7b8732d
100644
(file)
--- a/
lib/Mouse/Meta/TypeConstraint.pm
+++ b/
lib/Mouse/Meta/TypeConstraint.pm
@@
-69,6
+69,13
@@
sub get_message {
}
}
+sub is_a_type_of{
+ my($self, $tc_name) = @_;
+
+ return $self->name eq $tc_name
+ || $self->name =~ /\A $tc_name \[/xms; # "ArrayRef" =~ "ArrayRef[Foo]"
+}
+
1;
__END__