Skip Menu |

This queue is for tickets about the Text-Reform CPAN distribution.

Report information
The Basics
Id: 123105
Status: new
Priority: 0/
Queue: Text-Reform

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

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



Subject: Memory cycle in fix_config
Hi, Looks like there's an unintentional memory cycle in the fix_config sub: my $tmp = $config->{header}; $config->{header} = sub { my $header = &$tmp; return (ref $header eq 'HASH') ? lcr($header,$config->{pagewidth},'header')->() : $header; } This is capturing the $config variable, causing a memory leak in long-running code. Possible fixes could include: * Pass the $config object to the header/footer callbacks * Extract $config->{pagewidth} out to a $pagewidth variable (i.e. take the current value, rather than looking it up from the callback) Originally reported by flamey in https://www.reddit.com/r/perl/comments/71otee/memory_leak_and_a_bug_in_textautoformat_i_guess/