Don't define new() in this benchmark, make_immutable creates one
[gitmo/Class-MOP.git] / bench / lib / MOP / Immutable / Point.pm
CommitLineData
857f87a7 1
2package MOP::Immutable::Point;
3
4use strict;
5use warnings;
6use metaclass;
7
c0cbf4d9 8__PACKAGE__->meta->add_attribute('x' => (accessor => 'x', default => 10));
857f87a7 9__PACKAGE__->meta->add_attribute('y' => (accessor => 'y'));
10
857f87a7 11sub clear {
12 my $self = shift;
13 $self->x(0);
14 $self->y(0);
15}
16
17__PACKAGE__->meta->make_immutable;
18
191;
20
1d9507b6 21__END__