From: Stevan Little Date: Wed, 28 Jun 2006 01:44:26 +0000 (+0000) Subject: foo X-Git-Tag: 0_33~36 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=25803581ff9edc2c7ab78dd0493a9a06a9b13f51;p=gitmo%2FClass-MOP.git foo --- diff --git a/bench/lib/MOP/Point.pm b/bench/lib/MOP/Point.pm new file mode 100644 index 0000000..eb96573 --- /dev/null +++ b/bench/lib/MOP/Point.pm @@ -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 index 0000000..2bd544d --- /dev/null +++ b/bench/lib/MOP/Point3D.pm @@ -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