Skip to content

Instantly share code, notes, and snippets.

@funrep

funrep/test.p6 Secret

Created January 10, 2016 16: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 funrep/b6b67edd788a2da663fe to your computer and use it in GitHub Desktop.
Save funrep/b6b67edd788a2da663fe to your computer and use it in GitHub Desktop.
use v6;
class MyClass {
has $!hidden;
has $.public;
method sayhidden () {
say $!hidden;
}
submethod BUILD(:$hidden, :$public) { }
}
my $class = MyClass.new(hidden => "foo", public => "bar");
$class.sayhidden(); # (Any)
say $class.public; # (Any)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment