Cor - Perl को लागी एक वैकल्पिक OOP प्रणाली

По ссылке сравнение 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;
}
}

स्रोत: linux.org.ru

एक टिप्पणी थप्न