Skip to content

Instantly share code, notes, and snippets.

@tadzik
Created June 27, 2016 08:20
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 tadzik/1f0d9ac127f96ad5ed06fa8fa0cd7d56 to your computer and use it in GitHub Desktop.
Save tadzik/1f0d9ac127f96ad5ed06fa8fa0cd7d56 to your computer and use it in GitHub Desktop.
class User {
has $.username is required;
method new(*%args) {
my $obj = self.bless(*, |%args);
return $obj;
}
}
User.new(username => 'foo');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment