projects
/
gitmo/Moose.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
7ec0aba7a8a45b22e0574c4e302c12e84bbc7bce
[gitmo/Moose.git]
/
benchmarks
/
cmop
/
lib
/
Plain
/
Point3D.pm
1
#!/usr/bin/perl
2
3
package Plain::Point3D;
4
5
use strict;
6
use warnings;
7
8
use base 'Plain::Point';
9
10
sub new {
11
my ( $class, %params ) = @_;
12
my $self = $class->SUPER::new( %params );
13
$self->{z} = $params{z};
14
return $self;
15
}
16
17
sub z {
18
my ( $self, @args ) = @_;
19
20
if ( @args ) {
21
$self->{z} = $args[0];
22
}
23
24
return $self->{z};
25
}
26
27
sub clear {
28
my $self = shift;
29
$self->SUPER::clear();
30
$self->{z} = 0;
31
}
32
33
__PACKAGE__;
34
35
__END__
36