foo
Stevan Little [Wed, 28 Jun 2006 13:00:47 +0000 (13:00 +0000)]
bench/lib/Plain/Point3D.pm [new file with mode: 0644]

diff --git a/bench/lib/Plain/Point3D.pm b/bench/lib/Plain/Point3D.pm
new file mode 100644 (file)
index 0000000..7ec0aba
--- /dev/null
@@ -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__
+