Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/lib/Moose/Meta/TypeConstraint/DuckType.pm b/lib/Moose/Meta/TypeConstraint/DuckType.pm
- index 8957156..82fc83c 100644
- --- a/lib/Moose/Meta/TypeConstraint/DuckType.pm
- +++ b/lib/Moose/Meta/TypeConstraint/DuckType.pm
- @@ -24,10 +24,10 @@ my $inliner = sub {
- return 'Scalar::Util::blessed(' . $val . ') '
- . '&& Scalar::Util::blessed(' . $val . ') ne "Regexp" '
- - . '&& &List::MoreUtils::all('
- - . 'sub { ' . $val . '->can($_) }, '
- + . '&& do { my $obj = ' . $val . '; &List::MoreUtils::all('
- + . 'sub { $obj->can($_) }, '
- . join(', ', map { B::perlstring($_) } @{ $self->methods })
- - . ')';
- + . ') }';
- };
- sub new {
Add Comment
Please, Sign In to add comment