cookbook
[gitmo/Moose.git] / lib / Moose / Cookbook / Recipe1.pod
CommitLineData
471c4f09 1
2=pod
3
4=head1 NAME
5
6Moose::Cookbook::Recipe1
7
8=head1 SYNOPSIS
9
10 package Point;
11 use strict;
12 use warnings;
13 use Moose;
14
15 has 'x' => (isa => 'Int', is => 'ro');
16 has 'y' => (isa => 'Int', is => 'rw');
17
18 sub clear {
19 my $self = shift;
20 $self->{x} = 0;
21 $self->y(0);
22 }
23
24 package Point3D;
25 use strict;
26 use warnings;
27 use Moose;
28
29 extends 'Point';
30
31 has 'z' => (isa => 'Int');
32
33 after 'clear' => sub {
34 my $self = shift;
35 $self->{z} = 0;
36 };
37
38=head1 DESCRIPTION
39
40=head1 AUTHOR
41
42Stevan Little E<lt>stevan@iinteractive.comE<gt>
43
44=head1 COPYRIGHT AND LICENSE
45
46Copyright 2006 by Infinity Interactive, Inc.
47
48L<http://www.iinteractive.com>
49
50This library is free software; you can redistribute it and/or modify
51it under the same terms as Perl itself.
52
53=cut