summaryrefslogtreecommitdiff
path: root/benchmarks/cmop/lib/MOP/Installed/Point.pm
blob: 9b6e6cf83d6e96e9ac1d1be14113304b1c000dc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

use lib reverse @INC;

package MOP::Installed::Point;

use strict;
use warnings;
use metaclass;

__PACKAGE__->meta->add_attribute('x' => (accessor => 'x', default => 10));
__PACKAGE__->meta->add_attribute('y' => (accessor => 'y'));

sub new {
    my $class = shift;
    $class->meta->new_object(@_);
}

sub clear {
    my $self = shift;
    $self->x(0);
    $self->y(0);
}

1;

__END__