On Wed, Oct 28, 2015 at 03:31:09AM +0000, TS xx wrote: > > Can I call the Person's constructor (in non static context), > pass the required parameter and do more things before returning?
There are two answers to this question, both of which likely deserve a few lines in doc.perl6.org/language/faq. Lloyd alludes to both answers in his replies to the original post. 1. The typical answer to this question is to use "callwith", "callsame", "nextwith", or "nextsame". 2. Constructors already have some special support for building the superclass portions of an object -- see the BUILD submethod described in Synopsis 12. Pm