Skip Menu |

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

Report information
The Basics
Id: 127986
Status: rejected
Priority: 0/
Queue: Type-Tiny

People
Owner: Nobody in particular
Requestors: book [...] cpan.org
Cc:
AdminCc:

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



Subject: Predicate for complementary_type
Mostly needed for completeness, it could be something as simple as: sub has_complementary_type { exists $_[0]{complementary_type} }
On 2018-12-10T17:10:39Z, BOOK wrote: Show quoted text
> Mostly needed for completeness, it could be something as simple as: > > sub has_complementary_type { exists $_[0]{complementary_type} }
If you don't specify a complementary type when constructing the Type::Tiny object, then Type::Tiny will build one when needed. $type->complementary_type will always return something. So `has_complementary_type` would just be checking whether the complementary type has been built yet. I consider that to be an internal implementation detail. You shouldn't care whether Type::Tiny is building the complementary types on demand (lazy) like it does now, or eagerly in the constructor. For the same reason, there are no `has_compiled_check`, `has_mouse_type` and `has_moose_type` methods. Closing this issue unless you've got a better reason for wanting this method.