Skip to content

Instantly share code, notes, and snippets.

Created August 15, 2010 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/525747 to your computer and use it in GitHub Desktop.
Save anonymous/525747 to your computer and use it in GitHub Desktop.
use v6;
my Any $o;
my Code $m;
class Foo {
has Int $.counter = 0;
our method bar(){
$.counter++;
say "bar $.counter times called";
};
};
my $f = Foo.new();
$o = $f;
$m = &Foo::bar;
$o.$m();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment