Skip to content

Instantly share code, notes, and snippets.

@lucs
Created April 3, 2023 02:49
Show Gist options
  • Save lucs/259e6aad61651abcb192ae95625c044d to your computer and use it in GitHub Desktop.
Save lucs/259e6aad61651abcb192ae95625c044d to your computer and use it in GitHub Desktop.
class Foo {
method foo { "FOO " }
method bar { $.foo }
method jub { self.foo }
}
my $f = Foo.new;
say $f.foo, $f.bar, $f.jub; # «FOO FOO FOO ␤»
class Niy {
method niy { "NIY " }
method bar { $.niy; }
method jub { self.niy; }
}
say Niy.niy, Niy.bar, Niy.jub; # «NIY NIY NIY ␤»
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment