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

Bye,
  Andras

Reply via email to