Skip Menu |

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

Report information
The Basics
Id: 130823
Status: resolved
Priority: 0/
Queue: Type-Tiny

People
Owner: Nobody in particular
Requestors: x86mail [...] gmail.com
Cc:
AdminCc:

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



Subject: Cycle references
In Type::Tiny and Type::Coercion classes there is private attribute called _overload_coderef, with coderef that refers to "$self", but that coderef is stored in $self which results in reference cycle. Can be tested with perl -e 'use Types::Standard qw/Bool/; use Devel::Cycle; find_cycle(Bool)' Suggested solition (line 156 Type::Tiny, line 44 Type::Coercion): my $self_weak = weaken($self); $self->{_overload_coderef} ||= sub { $self_weak->assert_return(@_) };
Thank you
Releasing 1.006000 tomorrow, which will include this change.