Cor と Moose の比較については、リンクを参照してください。 サンプルコード:
クラスポイント{
has ( $x, $y ) :reader :writer :new :isa(Int);
メソッドクリア() {
( $x, $y ) = ( 0, 0 );
}
}
class Point3D isa Point {
$z :reader :writer :new :isa(Int); があります。
メソッドクリア() {
$self->next::メソッド;
$z = 0;
}
}
出所: linux.org.ru