set_rw
ErrorsCollection

set_rw

Synthesised documentation from type/Metamodel/AttributeContainer

From type/Metamodel/AttributeContainer

See Original text in context

method set_rw($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=> 2);
$p.x = 42;