Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
laziness, impatience, and hubris
 
PerlMonks  

Re^3: A way to test that circular references are actually freed

by Jeffrey Kegler (Friar)
on Oct 10, 2007 at 03:13 UTC ( #643855=note: print w/ replies, xml ) Need Help??


in reply to Re^2: A way to test that circular references are actually freed
in thread A way to test that circular references are actually freed

Here it is in all its alpha status glory. (It needs some formatting and more comments.) It passes a simple test suite, and has handled very complicated structures from another CPAN project (the reason I originally wrote it). I've applied to PAUSE for the name Test::Weaken.

There does seem to be a bug with the count of the total references, but it does not affect the count of freed references, and therefore fail/succeed reporting is unaffected.

UPDATE: I've removed the code. Test::Weaken is now on CPAN and anyone can see the latest version there. It's still alpha, but it has a start in the way of documentation and there are test scripts, which make good examples.

The version in this post did turn out to have the bug mentioned above, which is fixed in the CPAN version. I was reluctant to post the code but senior monks asked more than once to see it, and this humblest and most unworthy of Sextons was unwilling to refuse. Those who really feel they need to look at my first attempts, can look at earliest versions on backpan.

jeffrey


Comment on Re^3: A way to test that circular references are actually freed

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://643855]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2014-04-21 08:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (492 votes), past polls