[Bioperl-l] $obj->clone
ecky@e-lehmann.de
ecky@e-lehmann.de
Thu, 19 Sep 2002 18:55:01 +0200
Hi,
I had the same problem some time ago... and I found the Perl extension
"Clone" on CPAN.
On C level it copies large and nested data structures even with
references and references to references or Perl objects.
You can inherit from the module and use object oriented style or use
only the function clone() by "use Clone qw(clone);" as the man page
describes...
Here is the link:
http://search.cpan.org/author/RDF/Clone-0.13/Clone.pm
Hope it works for you...
Eckhard
Hilmar Lapp <hlapp@gnf.org> schrieb am 18.09.2002, 22:51:54:
> This was on the table a while ago, I know, so it may be a dead horse
> I'm beating. I rather mean it as a poll what people think and
> whether people think life is going to be easier or unchanged w/ or
> w/o a clone method.
>
> The background why I resumed beating this horse is I have written
> some code for bioperl-db that deep-traverses objects and replaces
> all possible child objects. This would get me 3/4 of the way for
> writing up a deep-clone routine (shallow clone is 2 lines in perl).
>
> Any thoughts whether having this would be useful or rather dangerous?
>
> -hilmar
> --
> -------------------------------------------------------------
> Hilmar Lapp email: lapp at gnf.org
> GNF, San Diego, Ca. 92121 phone: +1-858-812-1757
> -------------------------------------------------------------
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l