On Tue, Apr 12, 2005 at 08:33:34PM +0200, Rafael Garcia-Suarez wrote: > On Apr 12, 2005 8:24 PM, Dave Mitchell <[EMAIL PROTECTED]> wrote: > > > 2) add a negative voice class method: CLONE_ME_NOT (or whatever wording) > > > and do cloning unless CLONE_ME_NOT exists and returns true: > > > > > > + makes the perl-core implementation logic better > > > - might be confusing for users (as they will have to deal with > > > the reversed logic) > > > > I guess I'm coming round the idea of (2). How about CLONE_SKIP() as a > > name? And how about we insist people either return a false value or the > > numeric value 1 (rather than any arbitrary true value) to allow for future > > expansion (eg returning multiple flags). > > That's my favourite too. Also, avoiding CLONEing pure-perl objects by > default is not an option IMHO. > > > I'm assuming that the calling of CLONE_SKIP() for each class or subclass > > will do inheritance and AUTLOADing, just like CLONE() currently does. > > CLONE_SKIP is a good name. And of course it'll obey to the usual > class-method semantics.
I hate to bring this up two months later, but that probably should have been CLONESKIP. perlsub says: Subroutines whose names are in all upper case are reserved to the Perl core, as are modules whose names are in all lower case. A subroutine in all capitals is a loosely-held convention meaning it will be called indirectly by the run-time system itself, usually due to a triggered event. Subroutines that do special, pre-defined things include C<AUTOLOAD>, C<CLONE>, C<DESTROY> plus all functions mentioned in L<perltie> and L<PerlIO::via>. which implies to me that such routines should match /^[A-Z]+\z/. Is it too late to change? Looks like this change didn't get mentioned in perl587delta.pod anyway.