delete $machines{+shift};
is from the original author of FSA::Rules. I just added the debug messages and the Devel::FindRef.
You were right about your guess: I moved the usage of Devel::FindRef to the scope of ListParser class and could get the message:
FSA::Rules=HASH(0x31cc818) [refcount 13] is
+- referenced by REF(0x31d8740) [refcount 1], which is
| the member 'machine' of HASH(0x31cc788) [refcount 1],
Later, in the DESTROY, Devel::FindRef gave me the same HASH address.
After a fair amount of time checking the code of FSA::Rules, I got this (I pasted only the interesting parts):
I created a new method to loop over %machines and %states and setting the references to the FSA::Rules object to undef. and invoked it at the end of parse method from ListParser.
After that, I could finally get the object termination in the moment that I want:
Thanks!
Alceu Rodrigues de Freitas Junior
---------------------------------
"You have enemies? Good. That means you've stood up for something, sometime in your life." - Sir Winston Churchill
|