summaryrefslogtreecommitdiff
path: root/lib/Class
diff options
context:
space:
mode:
authorKen Neighbors <perlbug@perl.org>2002-09-19 18:48:22 +0000
committerhv <hv@crypt.org>2002-09-26 15:56:07 +0000
commit7a75f23295b1c1b6088ac400a7ad3d07428a20c1 (patch)
treeb64e0291946c570cec02300e653fb2d218f27695 /lib/Class
parent2b4bd638ab397a4d93192b8f54f8161045373803 (diff)
downloadperl-7a75f23295b1c1b6088ac400a7ad3d07428a20c1.tar.gz
[perl #17445] Class::Struct patch: version number, examples
From: Ken Neighbors (via RT) <perlbug@perl.org> Message-Id: <rt-17445-38150.7.26118647008619@bugs6.perl.org> p4raw-id: //depot/perl@17930
Diffstat (limited to 'lib/Class')
-rw-r--r--lib/Class/Struct.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Class/Struct.pm b/lib/Class/Struct.pm
index c46ebcd26d..ec080a1526 100644
--- a/lib/Class/Struct.pm
+++ b/lib/Class/Struct.pm
@@ -14,7 +14,7 @@ require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(struct);
-$VERSION = '0.61';
+$VERSION = '0.63';
## Tested on 5.002 and 5.003 without class membership tests:
my $CHECK_CLASS_MEMBERSHIP = ($] >= 5.003_95);
@@ -463,13 +463,13 @@ type C<Timeval>.
use Class::Struct;
struct( Rusage => {
- ru_utime => 'Timeval', # seconds
- ru_stime => 'Timeval', # microseconds
+ ru_utime => 'Timeval', # user time used
+ ru_stime => 'Timeval', # system time used
});
struct( Timeval => [
- tv_secs => '$',
- tv_usecs => '$',
+ tv_secs => '$', # seconds
+ tv_usecs => '$', # microseconds
]);
# create an object:
@@ -500,10 +500,10 @@ accessor accordingly.
my $self = shift;
if ( @_ ) {
die 'count must be nonnegative' if $_[0] < 0;
- $self->{'count'} = shift;
+ $self->{'MyObj::count'} = shift;
warn "Too many args to count" if @_;
}
- return $self->{'count'};
+ return $self->{'MyObj::count'};
}
package main;