diff options
| author | fukachan <fukachan> | 2004-06-30 03:05:13 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2004-06-30 03:05:13 +0000 |
| commit | b82e1fde5ecb5a7cf008ebcedc5268ac1a7aac72 (patch) | |
| tree | 91962526ea9859c847ceeee3890b0c1389c1b1d8 /fml/lib/IO/Adapter | |
| parent | 8bd1d2a1110bb0a6e55daf3b397e34ae3f47ea72 (diff) | |
| download | fml8-b82e1fde5ecb5a7cf008ebcedc5268ac1a7aac72.tar.gz fml8-b82e1fde5ecb5a7cf008ebcedc5268ac1a7aac72.tar.bz2 fml8-b82e1fde5ecb5a7cf008ebcedc5268ac1a7aac72.zip | |
overhaul: fix comments and messages. validate initial value.
Diffstat (limited to 'fml/lib/IO/Adapter')
| -rw-r--r-- | fml/lib/IO/Adapter/Array.pm | 16 | ||||
| -rw-r--r-- | fml/lib/IO/Adapter/ErrorStatus.pm | 4 | ||||
| -rw-r--r-- | fml/lib/IO/Adapter/NIS.pm | 5 | ||||
| -rw-r--r-- | fml/lib/IO/Adapter/UnixGroup.pm | 4 |
4 files changed, 17 insertions, 12 deletions
diff --git a/fml/lib/IO/Adapter/Array.pm b/fml/lib/IO/Adapter/Array.pm index 7b8b3779..014439d1 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.34 2003/11/29 06:31:48 fukachan Exp $ +# $FML: Array.pm,v 1.35 2004/01/24 09:03:55 fukachan Exp $ # package IO::Adapter::Array; @@ -84,7 +84,7 @@ $flag is "r" only (read only) now. # flag => $flag # _array_reference => ARRAY_REFERENCE # } -# Side Effects: malloc @elements array +# Side Effects: malloc @elements array. # Return Value: ARRAY_REF sub open { @@ -102,7 +102,7 @@ sub open $self->{_elements} = $r_array; $self->{_num_elements} = $#elements; $self->{_counter} = 0; - return( @elements ? \@elements : undef ); + return( @elements ? \@elements : [] ); } @@ -119,7 +119,7 @@ return the next element of the array. =cut -# Descriptions: forwarded to get_next_key() +# Descriptions: forwarded to get_next_key(). # XXX getline() == get_next_key() is valid in this case. # XXX since this map has only key and no value. # Arguments: OBJ($self) HASH_REF($args) @@ -128,7 +128,8 @@ return the next element of the array. sub getline { get_next_key(@_);} -# Descriptions: return (key, values, ... ) as ARRAY_REF +# Descriptions: return (key, values, ... ) as ARRAY_REF. +# XXX no value in the case of this map. # Arguments: OBJ($self) HASH_REF($args) # Side Effects: none # Return Value: ARRAY_REF @@ -139,7 +140,7 @@ sub get_key_values_as_array_ref return [ $x ]; } -# Descriptions: return the next element of the array +# Descriptions: return the next element of the array. # Arguments: OBJ($self) HASH_REF($args) # Side Effects: increment the counter in the object # Return Value: STR(the next element) @@ -198,6 +199,7 @@ end of IO operation. It is a dummy. =cut + # Descriptions: echeck whether end of the array is not now. # Arguments: OJB($self) # Side Effects: none @@ -206,6 +208,8 @@ end of IO operation. It is a dummy. sub eof { my ($self) = @_; + + # XXX-TODO: > ? >= ? OK? $self->{_counter} > $self->{_num_elements} ? 1 : 0; } diff --git a/fml/lib/IO/Adapter/ErrorStatus.pm b/fml/lib/IO/Adapter/ErrorStatus.pm index d294e777..0a11f5f1 100644 --- a/fml/lib/IO/Adapter/ErrorStatus.pm +++ b/fml/lib/IO/Adapter/ErrorStatus.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: ErrorStatus.pm,v 1.7 2003/08/23 15:33:16 fukachan Exp $ +# $FML: ErrorStatus.pm,v 1.8 2004/01/24 09:03:56 fukachan Exp $ # package IO::Adapter::ErrorStatus; @@ -19,7 +19,7 @@ require Exporter; =head1 NAME -IO::Adapter::ErrorStatus - error handling component +IO::Adapter::ErrorStatus - error handling component. =head1 SYNOPSIS diff --git a/fml/lib/IO/Adapter/NIS.pm b/fml/lib/IO/Adapter/NIS.pm index 95ce1bf7..6d904cd2 100644 --- a/fml/lib/IO/Adapter/NIS.pm +++ b/fml/lib/IO/Adapter/NIS.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: NIS.pm,v 1.22 2003/08/23 15:33:16 fukachan Exp $ +# $FML: NIS.pm,v 1.23 2004/01/24 09:00:53 fukachan Exp $ # package IO::Adapter::NIS; @@ -19,7 +19,7 @@ use IO::Adapter::Array; =head1 NAME -IO::Adapter::NIS - NIS map operations +IO::Adapter::NIS - NIS map operations. =head1 SYNOPSIS @@ -62,6 +62,7 @@ sub configure # XXX-TODO: UNIX only. # XXX-TODO: we call "ypmatch" but should use full-path if could. + # XXX-TODO: who validate $key value ? # emulate an array on memory my $key = $me->{_name}; my (@x) = split(/:/, `ypmatch $key group.byname`); diff --git a/fml/lib/IO/Adapter/UnixGroup.pm b/fml/lib/IO/Adapter/UnixGroup.pm index e5100833..bbddcf7e 100644 --- a/fml/lib/IO/Adapter/UnixGroup.pm +++ b/fml/lib/IO/Adapter/UnixGroup.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: UnixGroup.pm,v 1.20 2003/08/23 15:33:16 fukachan Exp $ +# $FML: UnixGroup.pm,v 1.21 2004/01/24 09:00:53 fukachan Exp $ # package IO::Adapter::UnixGroup; @@ -19,7 +19,7 @@ use IO::Adapter::Array; =head1 NAME -IO::Adapter::UnixGroup - IO wrapper to read /etc/group +IO::Adapter::UnixGroup - IO wrapper to read /etc/group. =head1 SYNOPSIS |
