[Newbies] Object clone
Randal L. Schwartz
merlyn at stonehenge.com
Tue Jan 15 17:38:11 UTC 2008
>>>>> "Jakub" == Jakub <seasidebeginner at gmail.com> writes:
Jakub> yeah a, b instance of same class and i want copy all instance variables
Jakub> values to a i want do a := b but i dont want to a is same object as b. In
Jakub> memory will be two objects a, b with same values .. but if i change a i dont
Jakub> change b.
b := a copy.
but you might also want to look at #deepCopy.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
More information about the Beginners
mailing list