summaryrefslogtreecommitdiff
path: root/benchmarks/cmop/lib/Plain/Point3D.pm
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/cmop/lib/Plain/Point3D.pm')
-rw-r--r--benchmarks/cmop/lib/Plain/Point3D.pm35
1 files changed, 35 insertions, 0 deletions
diff --git a/benchmarks/cmop/lib/Plain/Point3D.pm b/benchmarks/cmop/lib/Plain/Point3D.pm
new file mode 100644
index 0000000..87a460e
--- /dev/null
+++ b/benchmarks/cmop/lib/Plain/Point3D.pm
@@ -0,0 +1,35 @@
+#!/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__