Saib qhov txuas rau kev sib piv ntawm Cor thiab Moose. Qauv code:
chav kawm Point {
has($x, $y) :reader :writer :new :isa(Int);
method clear() {
($x, $y) = (0, 0);
}
}
chav kawm Point3D yog Point {
muaj $z :reader :writer :new :isa(Int);
method clear() {
$self->Next::method;
$z = 0;
}
}
Tau qhov twg los: linux.org.ru ua