Created
August 3, 2015 12:41
-
-
Save anonymous/4d6c3cff038c4b3131bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
class A { | |
has @!a; | |
method new () { | |
my $obj = self.bless; | |
$obj!a = 1,2,3; | |
$obj; | |
} | |
} | |
my $o = A.new; | |
say $o; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
use v6;
class A {
has @!a;
method new () {
my $obj = self.bless(a => [1,2,3]);
$obj;
}
submethod BUILD(:@!a) { }
}
my $o = A.new;
say $o.perl