From: Peter Scott [mailto:[EMAIL PROTECTED]]
>
> >I would like deep copying to include copying CODE. It would
> >be useful for implementing object methods...
>
> Why would it be necessary to deep copy a CODE reference?
It might not be necessary. I'm still learning how to write kosher Perl...
elegance is a long way off for me.
It'd be nice to for a class to be able to initialize a new object containing
a copy of an anonymous subroutine instead of a reference to a common one.
There might be some real justification when used with closures. Then class
methods could pass through to object methods that could be switched at
runtime.
Besides, it wouldn't be deep copying if it shallow copied the subroutines ;)
If deep copying and cloning are though of in terms of persistent objects...
aka Data::Dumper and Storable, then deparsing subroutines into something
that can be stored becomes more important too. Class::Tom does this pretty
well.
Garrett