Finished slides & exercises for section 3on basic attributes.
[gitmo/moose-presentations.git] / moose-class / exercises / answers / 02-roles / Employee.pm
1 package Employee;
2
3 use Moose;
4
5 extends 'Person';
6
7 has title  => ( is => 'rw' );
8 has salary => ( is => 'rw' );
9 has ssn    => ( is => 'ro' );
10
11 override full_name => sub {
12     my $self = shift;
13
14     return super() . q[ (] . $self->title . q[)];
15 };
16
17 no Moose;
18
19 __PACKAGE__->meta->make_immutable;
20
21 1;