Inheritance/Single: Difference between revisions

→‎{{header|Perl 6}}: Perl 6 solution
m (→‎{{header|Tcl}}: improve requirements)
(→‎{{header|Perl 6}}: Perl 6 solution)
Line 623:
}
class Collie extends Dog {
# methods go here...
}</lang>
 
=={{header|Perl 6}==
 
<lang perl>use v6;
 
class Animal {
# methods go here...
}
class Dog is Animal {
# methods go here...
}
class Cat is Animal {
# methods go here...
}
class Lab is Dog {
# methods go here...
}
class Collie is Dog {
# methods go here...
}</lang>
23

edits