5 has 'x' => (isa => 'Int', is => 'rw', required => 1);
6 has 'y' => (isa => 'Int', is => 'rw', required => 1);
19 has 'z' => (isa => 'Int', is => 'rw', required => 1);
21 after 'clear' => sub {
28 # hash or hashrefs are ok for the constructor
29 my $point1 = Point->new(x => 5, y => 7);
30 my $point2 = Point->new({x => 5, y => 7});
32 my $point3d = Point3D->new(x => 5, y => 42, z => -5);
34 print "point1: ", $point1->dump();
35 print "point2: ", $point2->dump();
36 print "point3: ", $point3d->dump();