Perl 6 Cool Perl 6 #97

Inheritance

The is keyword handles inheritance (and other things):

class Puppy is Dog {
    method bark() { say "yap"; }  # override

    method chew($item) {          # new method
        $item.damage;
    }
}

Multiple inheritance also uses is:

class Puppy is Dog is Pet { ... }
Copyright © 2010
http://www.pmichaud.com/2010/pres/