Dan Sugalski <[EMAIL PROTECTED]> writes:
> At 05:31 AM 8/7/00 +1000, Damian Conway wrote:
> > > >Another one for my wish list: deep copying support built in. A devil
> > > >inside me thinks this should be a new assignment
> > > >operator. Damian? Sounds like this is up your alley. I want to do a
> > > >sanity check before taking up RFC space.
> > >
> > > Regardless of how this looks, it has some pretty significant
> > ramifications
> > > for the internals. What, for example, should happen if you deep-copy
> > a DBI
> > > object attached to an Oracle database?
> >
> >I would say that encountering an "external component" such as a file handle
> >during a clone() should either shalow copy the component or else throw an
> >exception.
>
> That's cool. I can also see calling a package's CLONE sub if you're cloning
> something blessed into it. Presumably it'd get the original as a parameter
> and return the new thing, or something of the sort.
With a UNIVERSAL::CLONE that does the Right Thing for a 'typical'
object representation. (eg: blessed hash currently, but possibly
something more efficient in Perl 6)
--
Piers