List properties
class Foo {
has $!a = now;
has Str $.b;
has Int $.c is rw;
}
my $object = Foo.new: b => "Hello", c => 42;
for $object.^attributes {
say join ", ", .name, .readonly, .container.^name, .get_value($object);
}Output:
$!a, True, Any, Instant:1470517602.295992
$!b, True, Str, Hello
$!c, False, Int, 42Last updated