Skip to content

Instantly share code, notes, and snippets.

Created August 6, 2012 00:10
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save anonymous/3268320 to your computer and use it in GitHub Desktop.
Role composition and multi
#!/usr/bin/perl6
role boo1 {
multi method boo ($message) {
say "Boo1: $message";
}
}
role boo2 {
multi method boo () {
say "Boo2";
}
}
class Boo does boo1 does boo2 {
method boo () {
say "Boo";
}
}
my $booable = Boo.new;
$booable.boo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment