Skip to content

Instantly share code, notes, and snippets.

@tadzik
Created June 27, 2016 08:33
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/6eaf3d7181fd95a47f33ef9d41736d64 to your computer and use it in GitHub Desktop.
Save tadzik/6eaf3d7181fd95a47f33ef9d41736d64 to your computer and use it in GitHub Desktop.
use Inline::Perl5;
class User {
has $!perl5 = Inline::Perl5.new;
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