projects
/
gitmo/Moose.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Remove all trailing whitespace
[gitmo/Moose.git]
/
benchmarks
/
cmop
/
lib
/
MOP
/
Immutable
/
Point.pm
1
2
package MOP::Immutable::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 clear {
12
my $self = shift;
13
$self->x(0);
14
$self->y(0);
15
}
16
17
__PACKAGE__->meta->make_immutable;
18
19
1;
20
21
__END__