Merged CMOP into Moose
[gitmo/Moose.git] / benchmarks / cmop / lib / MOP / Installed / Point.pm
diff --git a/benchmarks/cmop/lib/MOP/Installed/Point.pm b/benchmarks/cmop/lib/MOP/Installed/Point.pm
new file mode 100644 (file)
index 0000000..4ad669a
--- /dev/null
@@ -0,0 +1,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__
\ No newline at end of file