|Perl: the Markov chain saw|
getting shared_clone() functionality with earlier threads::shared?by DrWhy (Chaplain)
|on Nov 10, 2010 at 00:59 UTC||Need Help??|
DrWhy has asked for the
wisdom of the Perl Monks concerning the following question:
I need to be able to do what threads::shared::shared_clone() does, namely do a deep copy of a data structure except that any portions that are shared are not cloned, but copied into the new structure, maintaining their sharedness with the old structure.
However, I need to do this with slightly older versions of threads::shared. We are working with version 1.14, but this function was added in version 1.21, I believe. It is not practical for us to upgrade at this time, and anyway, I'm considering putting this module up on CPAN and want to minimize the version-dependencies as much as possible.
Is there a solution to this problem that was avaible before the advent of threads::shared::shared_clone()?
"If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."