Skip Menu |
 

This queue is for tickets about the Type-Tiny CPAN distribution.

Report information
The Basics
Id: 114915
Status: patched
Priority: 0/
Queue: Type-Tiny

People
Owner: perl [...] toby.ink
Requestors: haarg [...] haarg.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: Mismatch in isa vs can for parameterized types
Download (untitled) / with headers
text/plain 389b
Parameterized type constraints will return true from a check like $tc->isa('Moose::Meta::TypeConstraint::Parameterized'), however calls to $tc->can for some things will fail even though that class provides them. For example, $tc->can('parameterized_from') will return undef. This is partly because the $tc->moose_type is a Moose::Meta::TypeConstraint rather than a parameterized variant.
Download (untitled) / with headers
text/plain 650b
On 2016-05-31T19:50:58+01:00, haarg wrote: Show quoted text
> Parameterized type constraints will return true from a check like $tc-
> >isa('Moose::Meta::TypeConstraint::Parameterized'), however calls to
> $tc->can for some things will fail even though that class provides > them. For example, $tc->can('parameterized_from') will return undef. > > This is partly because the $tc->moose_type is a > Moose::Meta::TypeConstraint rather than a parameterized variant.
Not sure whether the best solution is to make `can` more complicated, make `moose_type` more complicated, or implement the missing bits of functionality from Moose::Meta::TypeConstraint::Parameterized.
Implemented missing methods in repo.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.