projects
/
gitmo/MooseX-Types.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
d7d0bd9
)
test the type constraint directly, don't be clever
Matt S Trout [Fri, 18 May 2012 13:39:43 +0000 (13:39 +0000)]
lib/MooseX/Types/TypeDecorator.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/MooseX/Types/TypeDecorator.pm
b/lib/MooseX/Types/TypeDecorator.pm
index
6f02813
..
943bcd6
100644
(file)
--- a/
lib/MooseX/Types/TypeDecorator.pm
+++ b/
lib/MooseX/Types/TypeDecorator.pm
@@
-117,8
+117,10
@@
handle $self->isa since AUTOLOAD can't.
=cut
sub isa {
- return 1 if $_[1]->isa('Moose::Meta::TypeConstraint');
- shift->_try_delegate('isa', @_)
+ my $self = shift;
+ return
+ $self->__type_constraint->isa(@_)
+ || $self->_try_delegate('isa', @_);
}
=head2 can