[Koha-devel] Circular references

Chris Cormack chris at bigballofwax.co.nz
Mon Nov 29 09:12:09 CET 2010


On 29 November 2010 21:08, LAURENT Henri-Damien
<henridamien.laurent at biblibre.com> wrote:
> Le 29/11/2010 01:58, Chris Cormack a écrit :
>> 2010/11/27 LAURENT Henri-Damien <henridamien.laurent at biblibre.com>:
>>> Hi
>>> During KohaCon, Plack and Data persistance was discussed and wome work
>>> was done on that.
>>> Ian posted a perl script.
>>> Marc did another script. It works quite fast.
>>> I wanted to publicise this in order to contribute code so that
>>> eventually all the circular references could be solved.
>>> Find enclosed both scripts : CIRCDeps.pl from Marc and dep_check.pl
>>> We will try and keep you informed of what we achieved with that.
>>>
>> Unfortunately (if i'm reading correctly) this will only find modules
>> that have circular dependencies on other modules.
> Yes, both (Ian and Marc scripts) are investigating Circular Modules
> references.
>
>>
>> What causes memory leaks is circular references in the code, where an
>> object refers to an object that refers to the inital object (or to
>> another object that refers to it).
>>
>> http://stackoverflow.com/questions/2223721/common-perl-memory-reference-leak-patterns
>>
>> These are much harder to find. But there is a module that can help us
>> http://search.cpan.org/dist/Devel-Cycle/lib/Devel/Cycle.pm
> I am aware of Devel::Cycle, but I doubt we have circular objects
> references other than Modules, since Koha has mostly been procedural and
> not object oriented.
>
When I say object, I dont mean an Object in the Object Oriented
approach, but a thing, it could be a hashref, that references a hash,
that contains a reference to the first hash. Id find it highly
suprising if we didn't have at least a few of these.

Chris


More information about the Koha-devel mailing list