in reply to reduce reference count of hash
On the other hand, it shouldn't be too difficult to trace all references to that hash reference inside that "3rd party module", at least if it is written in Perl.
As a last ditch desperate measure, you could weaken the hash reference that the module returns to you (just before it is returned of course, for which you will need access to that 3rd party module), although it is likely that this will introduce all kinds of subtle bugs.
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
|
|---|