On Fri, 2004-04-09 at 04:56, Leopold Toetsch wrote:

> I've put in the new scheme for initializer calls.
> To test it, set the environment variable "CALL__BUILD" to some value.
> 
> Sample code to set an initializer to "_new"
> 
>      new P10, .PerlString
>      set P10, "_new"
>      newclass P1, "Foo"
>      setprop P1, "BUILD", P10
> 
> The BUILD initializer is called for all parents as "__init" was. There 
> is additionally a "CONSTRUCT" initializer, which is only called for the 
> top-level class.
> 
> The instantiation "new Pobj, Iclass" can now take an additional 
> initializer too:
> 
>     new Pobj, Iclass, PInit
> 
> This initializer is available as first param in the init method.

I'm happy with this.  A similar scheme will work nicely for
deconstructors.

(I looked for where to make this possible, but didn't see any obvious
hooks.)

-- c

Reply via email to