Merged CMOP into Moose
[gitmo/Moose.git] / benchmarks / cmop / lib / MOP / Point.pm
1
2 package MOP::Point;
3
4 use strict;
5 use warnings;
6 use metaclass;
7
8 __PACKAGE__->meta->add_attribute('x' => (accessor => 'x', default => 10));
9 __PACKAGE__->meta->add_attribute('y' => (accessor => 'y'));
10
11 sub new {
12     my $class = shift;
13     $class->meta->new_object(@_);
14 }
15
16 sub clear {
17     my $self = shift;
18     $self->x(0);
19     $self->y(0);    
20 }
21
22 1;
23
24 __END__