update l10n: de
[gitmo/moose-website.git] / data / code_samples / point.txt
CommitLineData
7d44d2b1 1package Point;
2use Moose; # automatically turns on strict and warnings
3
4has 'x' => (is => 'rw', isa => 'Int');
5has 'y' => (is => 'rw', isa => 'Int');
6
7sub clear {
8 my $self = shift;
9 $self->x(0);
10 $self->y(0);
11}
12
13package Point3D;
14use Moose;
15
16extends 'Point';
17
18has 'z' => (is => 'rw', isa => 'Int');
19
20after 'clear' => sub {
21 my $self = shift;
22 $self->z(0);
23};