По ссылке сравнение Cor и Moose. Пример кода:
class Point {
has ( $x, $y ) :reader :writer :new :isa(Int);
method clear () {
( $x, $y ) = ( 0, 0 );
}
}
class Point3D isa Point {
has $z :reader :writer :new :isa(Int);
method clear () {
$self->next::method;
$z = 0;
}
}
>>> Подробности