foo
Stevan Little [Wed, 28 Jun 2006 01:44:26 +0000 (01:44 +0000)]
bench/lib/MOP/Point.pm [new file with mode: 0644]
bench/lib/MOP/Point3D.pm [new file with mode: 0644]

diff --git a/bench/lib/MOP/Point.pm b/bench/lib/MOP/Point.pm
new file mode 100644 (file)
index 0000000..eb96573
--- /dev/null
@@ -0,0 +1,24 @@
+
+package MOP::Point;
+
+use strict;
+use warnings;
+use metaclass;
+
+__PACKAGE__->meta->add_attribute('x' => (accessor => 'x'));
+__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
diff --git a/bench/lib/MOP/Point3D.pm b/bench/lib/MOP/Point3D.pm
new file mode 100644 (file)
index 0000000..2bd544d
--- /dev/null
@@ -0,0 +1,20 @@
+
+package MOP::Point3D;
+
+use strict;
+use warnings;
+use metaclass;
+
+use base 'MOP::Point';
+
+__PACKAGE__->meta->add_attribute('z' => (accessor => 'z'));
+
+sub clear {
+    my $self = shift;
+    $self->SUPER::clear();
+    $self->z(0);    
+}
+
+1;
+
+__END__
\ No newline at end of file