At 17:33 12/02/2001 -0500, Dan Sugalski wrote: >At 11:28 PM 2/12/2001 +0100, Robin Berjon wrote: >>Couldn't we simply (for non-implementer values of simply) provide a way for >>people to ask for finalization on an object ? Given that most of the time >>it isn't needed, it wouldn't be too much of a burden for programmers to >>have to write i_want_some_finalization($object, [finalization params]) ? > >Sure. Y'know, maybe we could even have a sub with a special name! Maybe... >DESTROY? :) Yes, I'm vaguely aware of that possibility :) I believe I misexpressed myself. What I meant was re non-refcount GC and predictability of destruction. If the author wanted refcount triggered destruction for a given object he'd say so explicitly. That would make it easy to separate the objects that require deterministic destruction from those that can be left to the more sophisticated GC. >Adding something like: > > package foo; > use attrs qw(cleanup_sub); > >would be nice, but I don't know that he'll go for it. (Though it's the only >way I can think of to avoid AUTOLOAD being considered a potential destructor) Yes that would be nice indeed. -- robin b. You can tune a piano, but you can't tuna fish.