Skip Menu |
 

This queue is for tickets about the CGI-FormBuilder CPAN distribution.

Report information
The Basics
Id: 24696
Status: resolved
Priority: 0/
Queue: CGI-FormBuilder

People
Owner: Nobody in particular
Requestors: PAUSE [...] camachofamily.com
Cc:
AdminCc:

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



Subject: Circular references
Download (untitled) / with headers
text/plain 1.4k
It seems like CGI::FormBuilder has circular references that leaks memory. Here's a test that you can use as part of your test suite. use Test::Memory::Cycle; use Test::More tests => 1; use CGI::FormBuilder; my $f = CGI::FormBuilder->new( { source => {type => 'File', source => \"name: one\nfields:a,b"}, } ); memory_cycle_ok($f); twst@web [~/tmp/CGI-FormBuilder-3.05]# perl -Mblib t/4a-memory.t 1..1 not ok 1 # Failed test at t/4a-memory.t line 13. # Cycle #1 # CGI::FormBuilder A->{fieldrefs} => %B # %B->{a} => CGI::FormBuilder::Field C # CGI::FormBuilder::Field C->{_form} => CGI::FormBuilder A # Cycle #2 # CGI::FormBuilder A->{fieldrefs} => %B # %B->{b} => CGI::FormBuilder::Field D # CGI::FormBuilder::Field D->{_form} => CGI::FormBuilder A # Cycle #3 # CGI::FormBuilder A->{fields} => @E # @E->[0] => CGI::FormBuilder::Field C # CGI::FormBuilder::Field C->{_form} => CGI::FormBuilder A # Cycle #4 # CGI::FormBuilder A->{fields} => @E # @E->[1] => CGI::FormBuilder::Field D # CGI::FormBuilder::Field D->{_form} => CGI::FormBuilder A # Looks like you failed 1 test of 1.
I believe this was resolved by some great work by Juan et al (years ago).


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.