Skip to content

Commit

Permalink
A couple more trait handlers (though nothing yet answers them).
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jul 28, 2011
1 parent 333a91f commit 764d2f9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/traits.pm
Expand Up @@ -9,9 +9,16 @@ proto trait_mod:<is>(|$) { * }
multi trait_mod:<is>(Mu:U $child, Mu:U $parent) {
$child.HOW.add_parent($child, $parent);
}
multi trait_mod:<is>(Mu:U $type, :$rw!) {
$type.HOW.set_rw($type);
}

multi trait_mod:<is>(Attribute:D $attr, :$rw!) {
$attr.set_rw();
}
multi trait_mod:<is>(Attribute:D $attr, :$readonly!) {
$attr.set_readonly();
}

multi trait_mod:<is>(Routine:D $r, :$rw!) {
$r.set_rw();
Expand Down

0 comments on commit 764d2f9

Please sign in to comment.