diff options
| author | fukachan <fukachan> | 2002-12-22 02:54:37 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-12-22 02:54:37 +0000 |
| commit | a65723e5c55190909cc72ccc573bc737ee2caa73 (patch) | |
| tree | 170e40d592f6902e2ea1292fe4188f9278207568 /fml/lib/IO/Adapter/Array.pm | |
| parent | 3ef16f3fb2fd86aaf0904fa177b90d4339684b67 (diff) | |
| download | fml8-a65723e5c55190909cc72ccc573bc737ee2caa73.tar.gz fml8-a65723e5c55190909cc72ccc573bc737ee2caa73.tar.bz2 fml8-a65723e5c55190909cc72ccc573bc737ee2caa73.zip | |
fix comments. cosmetics.
Diffstat (limited to 'fml/lib/IO/Adapter/Array.pm')
| -rw-r--r-- | fml/lib/IO/Adapter/Array.pm | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/fml/lib/IO/Adapter/Array.pm b/fml/lib/IO/Adapter/Array.pm index 0edc0bd1..a88b4a30 100644 --- a/fml/lib/IO/Adapter/Array.pm +++ b/fml/lib/IO/Adapter/Array.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Array.pm,v 1.25 2002/09/11 23:18:19 fukachan Exp $ +# $FML: Array.pm,v 1.26 2002/09/22 14:56:58 fukachan Exp $ # package IO::Adapter::Array; @@ -16,7 +16,7 @@ use IO::Adapter::ErrorStatus qw(error_set error error_clear); =head1 NAME -IO::Adapter::Array - base class for IO emulation for the ARRAY +IO::Adapter::Array - base class for IO emulation for ARRAY_REF. =head1 SYNOPSIS @@ -30,7 +30,7 @@ IO::Adapter::Array - base class for IO emulation for the ARRAY =head1 DESCRIPTION -emulate IO operation for the ARRAY. +emulate IO operation for the ARRAY_REF on memory. One array is similar to a set of primary keys without optional values such as a file: @@ -64,7 +64,7 @@ sub new =item C<open($args)> -open IO for the array. $args is a hash reference. +open IO for the array ARRAY_REF. $args is a hash reference. The option follows: $args = { @@ -76,6 +76,7 @@ $flag is "r" only (read only) now. =cut + # Descriptions: open() emulation # Arguments: OBJ($self) HASH_REF($args) # $args = { @@ -88,7 +89,7 @@ sub open { my ($self, $args) = @_; my $flag = $args->{ flag } || 'r'; - my $r_array = $self->{ _array_reference}; + my $r_array = $self->{ _array_reference }; if ($flag ne 'r') { $self->error_set("Error: type=$self->{_type} is read only."); @@ -112,7 +113,7 @@ the same as get_next_value(). =item C<get_next_key()> -return the next element of the array +return the next element of the array. =item C<get_next_value()> @@ -139,7 +140,8 @@ sub get_next_key my ($self, $args) = @_; my $i = $self->{_counter}++; my $ra = $self->{_elements}; - defined $$ra[ $i ] ? $$ra[ $i ] : undef; + + return( defined $$ra[ $i ] ? $$ra[ $i ] : undef ); } @@ -155,7 +157,7 @@ sub get_next_value =head2 C<getpos()> -return the current position in the array +return the current position in the array. =head2 C<setpos($pos)> |
