BÁRTHÁZI András <[EMAIL PROTECTED]> writes:

> Hi,
>
> I'm wondering, if it's possible with Perl 6 or not?
>
> class MyClass {
>
>       method mymethod($par) {
>               say "mymethod called!";
>       }
>
> }
>
> class ExClass is MyClass {
>
>       mymethod(12);
>
> }
>
> #> pugs myprog
> mymethod called!
>
> I would like to use mymethod to add ExClass some methods, etc.
>
> ///
>
> Just another problem, related to the above:
>
> class MyClass {
>
>       method whenmother() {
>               say "MyClass is parent now!!!";
>               say "Her child name is: " ~ ????;
>       }
>
> }
>
> class Child is MyClass {
> }
>
> #> pugs myprog
> MyClass is parent now!!!
> Her child name is: Child

I'd like to hope so. Actually, I don't think that this *specific* functionality
should be in the core, but the ability to implement it (just needs a unified
notifcation scheme that gets tickled when new classes, methods, subs, packages,
etc, get added to the image -- more detailed behaviour is a SMOP).

Reply via email to