diff options
| author | fukachan <fukachan> | 2003-11-26 11:00:32 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-11-26 11:00:32 +0000 |
| commit | 7ac20a697c3c8929f5cd48e71fe7f11a750b4a11 (patch) | |
| tree | 1bc43a411a0b0573cf958f19c2b824d4b38eeaf1 /fml/lib/IO/Adapter/Array.pm | |
| parent | b4b3a44abf1c849838fb9a401297ab467346228a (diff) | |
| download | fml8-7ac20a697c3c8929f5cd48e71fe7f11a750b4a11.tar.gz fml8-7ac20a697c3c8929f5cd48e71fe7f11a750b4a11.tar.bz2 fml8-7ac20a697c3c8929f5cd48e71fe7f11a750b4a11.zip | |
implement get_key_values_as_array_ref() to return key and all values
as ARRAY_REF.
Diffstat (limited to 'fml/lib/IO/Adapter/Array.pm')
| -rw-r--r-- | fml/lib/IO/Adapter/Array.pm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/fml/lib/IO/Adapter/Array.pm b/fml/lib/IO/Adapter/Array.pm index 39f90fe1..d9c7b58f 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.31 2003/05/26 12:28:05 fukachan Exp $ +# $FML: Array.pm,v 1.32 2003/08/23 04:35:43 fukachan Exp $ # package IO::Adapter::Array; @@ -127,6 +127,17 @@ return the next element of the array. sub getline { get_next_key(@_);} +# Descriptions: return (key, values, ... ) as ARRAY_REF +# Arguments: OBJ($self) HASH_REF($args) +# Side Effects: none +# Return Value: ARRAY_REF +sub get_key_values_as_array_ref +{ + my ($self) = @_; + my $x = $self->get_next_key(); + return [ $x ]; +} + # Descriptions: return the next element of the array # Arguments: OBJ($self) HASH_REF($args) # Side Effects: increment the counter in the object |
