Skip Menu |

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

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

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

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



Subject: Circular reference on Type::Coercion
# Cycle: # $ZZ->{'Type::Coercion(148756936)'} => \%Type::Coercion::BAB # $Type::Coercion::BAB->{'type_coercion_map'} => \@BAC # $BAC->[0] => \%Type::Tiny::BAD # $Type::Tiny::BAD->{'parent'} => \%Type::Tiny::BAE # $Type::Tiny::BAE->{'constraint_generator'} => \&BAF # $BAF variable $meta => \$BAG # $$BAG => \%Types::Standard::BAH # $Types::Standard::BAH->{'types'} => \%BAJ # $BAJ->{'ArrayRef'} => \%Type::Tiny::BAD In other words: The $$meta->{types}{ArrayRef} in the constraint_generator points to $type_coercion_obj->{type_coercion_map}[0]. This seems to happen on all kinds of types within $$meta->{types}{*}. The parent connection on $type_coercion_obj->{type_coercion_map}[0]{parent} should probably be weakened.
The Type::Tiny constructor doesn't seem to weaken $params->{parent}, either.
Type constraints are not really intended to be short-lived objects, but installed into libraries and survive for the lifetime of the process. Weakening the link to the parent type constraint could result in false passes when checking values against a type. Rejecting this issue unless you can provide realistic examples where this is going to cause a problem.