method set_rw
Documentation for method set_rw assembled from the following types:
role Metamodel::AttributeContainer
From Metamodel::AttributeContainer
(Metamodel::AttributeContainer) method set_rw
method set_rw(Metamodel::AttributeContainer: $obj)
Marks a type whose attributes default to having a write accessor. For example in
class Point is rw {
has $.x;
has $.y;
}
The is rw trait on the class calls the set_rw method on the metaclass, making all the attributes implicitly writable, so that you can write;
my $p = Point.new(x => 1, y => 2); $p.x = 42;