From: Stevan Little Date: Wed, 28 Jun 2006 13:00:47 +0000 (+0000) Subject: foo X-Git-Tag: 0_33~34 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=df048d2ce585c19a774ce3cc7653e6e6a6cd5d85;p=gitmo%2FClass-MOP.git foo --- diff --git a/bench/lib/Plain/Point3D.pm b/bench/lib/Plain/Point3D.pm new file mode 100644 index 0000000..7ec0aba --- /dev/null +++ b/bench/lib/Plain/Point3D.pm @@ -0,0 +1,36 @@ +#!/usr/bin/perl + +package Plain::Point3D; + +use strict; +use warnings; + +use base 'Plain::Point'; + +sub new { + my ( $class, %params ) = @_; + my $self = $class->SUPER::new( %params ); + $self->{z} = $params{z}; + return $self; +} + +sub z { + my ( $self, @args ) = @_; + + if ( @args ) { + $self->{z} = $args[0]; + } + + return $self->{z}; +} + +sub clear { + my $self = shift; + $self->SUPER::clear(); + $self->{z} = 0; +} + +__PACKAGE__; + +__END__ +