Skip Menu |

This queue is for tickets about the Date-Manip CPAN distribution.

Report information
The Basics
Id: 94195
Status: rejected
Priority: 0/
Queue: Date-Manip

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

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



Subject: Memory cycles everywhere
I found a bunch of unweakened circular references in Date::Manip objects via Devel::Cycle. (Test::Memory::Cycle works, too.) Some examples: Cycle: $Date::Manip::Base::CP->{'objs'} => \%CQ $CQ->{'base'} => \%Date::Manip::Base::CP Cycle: $Date::Manip::Base::CP->{'objs'} => \%CQ $CQ->{'tz'} => \%Date::Manip::TZ::CR $Date::Manip::TZ::CR->{'objs'} => \%CS $CS->{'base'} => \%Date::Manip::Base::CP Cycle: $Date::Manip::TZ::CR->{'objs'} => \%CS $CS->{'tz'} => \%Date::Manip::TZ::CR Cycle: $Date::Manip::Base::CT->{'objs'} => \%CU $CU->{'base'} => \%Date::Manip::Base::CT Cycle: $Date::Manip::TZ::CR->{'objs'} => \%CS $CS->{'base'} => \%Date::Manip::Base::CP $Date::Manip::Base::CP->{'objs'} => \%CQ $CQ->{'tz'} => \%Date::Manip::TZ::CR Cycle: $Date::Manip::Base::CT->{'objs'} => \%CU $CU->{'base'} => \%Date::Manip::Base::CT Cycle: $Date::Manip::TZ::CV->{'objs'} => \%CW $CW->{'tz'} => \%Date::Manip::TZ::CV Cycle: $Date::Manip::Base::CT->{'objs'} => \%CU $CU->{'base'} => \%Date::Manip::Base::CT I don't see any sign of weaken being used in the modules, which it needs here. If base is a parent object of the main objects, then weaken should be applied to fix those reference loops. Every value in 'objs' seems like a good candidate, too.
Could you please provide a sample script? I wrote a simple script that created a Date::Manip::Date object and tested it and didn't see any cycles, so if you can show me the script that generated this output, that would help.
On Wed Mar 26 14:58:15 2014, SBECK wrote: Show quoted text
> Could you please provide a sample script? I wrote a simple script > that created a Date::Manip::Date object and tested it and didn't see > any cycles, so if you can show me the script that generated this > output, that would help.
These were actually found from scanning blessed objects using Devel::Gladiator, but I'll crank out a simpler test case to find them.
Disregard. Looks like I was accidentally testing against an older version and ran into RT #54937. Date-Manip 6.13 got rid of the {objs} and fixed the circular references.