diff options
| author | fukachan <fukachan> | 2001-05-30 14:35:09 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-05-30 14:35:09 +0000 |
| commit | 1149b16f28aa8f39ea7a405dcd826825125666c5 (patch) | |
| tree | dbafc7b0b8311e02b84c4edff83bb795b75b56a7 /fml/lib/IO | |
| parent | 48a3f038d2969351aa63d366eb87e34bf862447b (diff) | |
| download | fml8-1149b16f28aa8f39ea7a405dcd826825125666c5.tar.gz fml8-1149b16f28aa8f39ea7a405dcd826825125666c5.tar.bz2 fml8-1149b16f28aa8f39ea7a405dcd826825125666c5.zip | |
clean up documents
Diffstat (limited to 'fml/lib/IO')
| -rw-r--r-- | fml/lib/IO/Adapter.pm | 9 | ||||
| -rw-r--r-- | fml/lib/IO/Adapter/Array.pm | 47 | ||||
| -rw-r--r-- | fml/lib/IO/Adapter/DBI.pm | 30 | ||||
| -rw-r--r-- | fml/lib/IO/Adapter/File.pm | 5 | ||||
| -rw-r--r-- | fml/lib/IO/Adapter/MySQL.pm | 3 | ||||
| -rw-r--r-- | fml/lib/IO/Adapter/NIS.pm | 35 | ||||
| -rw-r--r-- | fml/lib/IO/Adapter/RDBMS.pm | 13 | ||||
| -rw-r--r-- | fml/lib/IO/Adapter/UnixGroup.pm | 36 |
8 files changed, 108 insertions, 70 deletions
diff --git a/fml/lib/IO/Adapter.pm b/fml/lib/IO/Adapter.pm index 5d0453d6..6fd12267 100644 --- a/fml/lib/IO/Adapter.pm +++ b/fml/lib/IO/Adapter.pm @@ -4,8 +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. # -# $Id$ -# $FML: MapAdapter.pm,v 1.28 2001/04/15 08:41:59 fukachan Exp $ +# $FML: Adapter.pm,v 1.1 2001/05/04 14:32:33 fukachan Exp $ # package IO::Adapter; @@ -29,7 +28,7 @@ IO::Adapter - adapter for several IO interfaces while ($x = $obj->getline) { ... } $obj->close; -where C<$map_params> is map specific parametes used for C<RDBMS>. +where C<$map_params> is map specific parameters used for such as C<RDBMS>. For example, C<$map_params> is: $map_params = { @@ -59,7 +58,7 @@ you can use the same methods as usual file IO. C<map> specifies the type of the database we read/write. -For example, C<file> map imples we hold our data in a file. +For example, C<file> map implies we hold our data in a file. The format is one line for one entry in a lot of cases. key1 @@ -94,7 +93,7 @@ This wrapper provides IO like a usual file for the specified C<$map>. =head1 METHODS -=item C<new()> +=item C<new($map, $args)> the constructor. The first argument is a map decribed above. diff --git a/fml/lib/IO/Adapter/Array.pm b/fml/lib/IO/Adapter/Array.pm index 7ec7c4d9..9d064638 100644 --- a/fml/lib/IO/Adapter/Array.pm +++ b/fml/lib/IO/Adapter/Array.pm @@ -4,8 +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. # -# $Id$ -# $FML: Array.pm,v 1.17 2001/04/03 09:45:45 fukachan Exp $ +# $FML: Array.pm,v 1.18 2001/04/08 13:25:40 fukachan Exp $ # package IO::Adapter::Array; @@ -17,7 +16,7 @@ use IO::Adapter::ErrorStatus qw(error_set error error_clear); =head1 NAME -IO::Adapter::Array - emulation of IO for the ARRAY +IO::Adapter::Array - IO emulation for the ARRAY =head1 SYNOPSIS @@ -37,7 +36,7 @@ emulate IO operation for the ARRAY. =item C<new()> -constructor. It is a dummy in fact now. +constructor. =cut @@ -127,6 +126,16 @@ sub get_next_value } +=head2 C<getpos()> + +return the current position in the array + +=head2 C<setpos($pos)> + +set the current position to $pos -th element. + +=cut + # Descriptions: return the current position in the array, that is, # which element in the array # Arguments: $self @@ -151,6 +160,17 @@ sub setpos } +=head2 C<eof()> + +whether the current position reaches the end of the array or not. +If it already reaches the end, return 1. + +=head2 C<close()> + +end of IO operation. It is a dummy. + +=cut + # Descriptions: whether end of the array is not now # Arguments: $self # Side Effects: none @@ -173,25 +193,6 @@ sub close } -=head2 - -=item C<getpos()> - -return the current position in the array - -=item C<setpos($pos)> - -set the current position to $pos -th element. - -=item C<eof()> - -whether the current position reaches the end of the array or not. -If it already reaches the end, return 1. - -=item C<close()> - -end of IO operation. It is a dummy. - =head1 AUTHOR Ken'ichi Fukamachi diff --git a/fml/lib/IO/Adapter/DBI.pm b/fml/lib/IO/Adapter/DBI.pm index 4cb488ff..44d10c1d 100644 --- a/fml/lib/IO/Adapter/DBI.pm +++ b/fml/lib/IO/Adapter/DBI.pm @@ -1,6 +1,6 @@ #-*- perl -*- # -# Copyright (C) 2000 Ken'ichi Fukamachi +# Copyright (C) 2000,2001 Ken'ichi Fukamachi # All rights reserved. # # $Id$ @@ -25,11 +25,15 @@ This module is a top level driver to talk with a DBI server in SQL (Structured Query Language). The model dependent SQL statement is expected to be holded in -C<SQL::Schema::> modules. +other modules in such as C<SQL::Schema::> class. Each model name is specified at $args->{ schema } in new($args). =head1 METHODS +=head2 C<make_dsn($args)> + +prepare C<dsn>. + =cut @@ -83,8 +87,12 @@ sub execute =head2 C<open($args)> +connected to SQL server specified by C<dsn>. + =head2 C<close($args)> +close connection to SQL server specified by C<dsn>. + =cut @@ -131,4 +139,22 @@ sub close } +=head1 AUTHOR + +Ken'ichi Fukamachi + +=head1 COPYRIGHT + +Copyright (C) 2001 Ken'ichi Fukamachi + +All rights reserved. This program is free software; you can +redistribute it and/or modify it under the same terms as Perl itself. + +=head1 HISTORY + +IO::Adapter::Array appeared in fml5 mailing list driver package. +See C<http://www.fml.org/> for more details. + +=cut + 1; diff --git a/fml/lib/IO/Adapter/File.pm b/fml/lib/IO/Adapter/File.pm index 4da370ac..b59bff29 100644 --- a/fml/lib/IO/Adapter/File.pm +++ b/fml/lib/IO/Adapter/File.pm @@ -4,8 +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. # -# $Id$ -# $FML: File.pm,v 1.21 2001/04/08 13:25:40 fukachan Exp $ +# $FML: File.pm,v 1.22 2001/05/04 14:32:33 fukachan Exp $ # package IO::Adapter::File; @@ -44,7 +43,7 @@ To delete it =head1 DESCRIPTION This module provides real IO functions for a file used in -IO::Adapter. +C<IO::Adapter>. The map is the fully path-ed file name or a file name with 'file:/' prefix. diff --git a/fml/lib/IO/Adapter/MySQL.pm b/fml/lib/IO/Adapter/MySQL.pm index ad006f92..bbd28b4c 100644 --- a/fml/lib/IO/Adapter/MySQL.pm +++ b/fml/lib/IO/Adapter/MySQL.pm @@ -1,6 +1,6 @@ #-*- perl -*- # -# Copyright (C) 2000 Ken'ichi Fukamachi +# Copyright (C) 2000,2001 Ken'ichi Fukamachi # All rights reserved. # # $Id$ @@ -220,4 +220,3 @@ See C<http://www.fml.org/> for more details. =cut 1; -1; diff --git a/fml/lib/IO/Adapter/NIS.pm b/fml/lib/IO/Adapter/NIS.pm index 1bf78f6a..1ff767f7 100644 --- a/fml/lib/IO/Adapter/NIS.pm +++ b/fml/lib/IO/Adapter/NIS.pm @@ -4,8 +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. # -# $Id$ -# $FML: NIS.pm,v 1.13 2001/04/03 09:45:46 fukachan Exp $ +# $FML: NIS.pm,v 1.14 2001/05/04 14:32:34 fukachan Exp $ # package IO::Adapter::NIS; @@ -18,19 +17,6 @@ use IO::Adapter::Array; @ISA = qw(IO::Adapter::Array); -sub configure -{ - my ($self, $me) = @_; - my ($type) = ref($self) || $self; - - # emulate an array on memory - my $key = $me->{_name}; - my (@x) = split(/:/, `ypmatch $key group.byname`); - my (@elements) = split ',', $x[3]; - $me->{_array_reference} = \@elements; -} - - =head1 NAME IO::Adapter::NIS - NIS map operations @@ -57,6 +43,25 @@ C<CAUTION: this map is read only>. See L<IO::Adapter::Array>. +=head2 C<configure($obj)> + +Configure $obj for array IO emulation. + +=cut + +sub configure +{ + my ($self, $me) = @_; + my ($type) = ref($self) || $self; + + # emulate an array on memory + my $key = $me->{_name}; + my (@x) = split(/:/, `ypmatch $key group.byname`); + my (@elements) = split ',', $x[3]; + $me->{_array_reference} = \@elements; +} + + =head1 SEE ALSO L<IO::Adapter::Array> diff --git a/fml/lib/IO/Adapter/RDBMS.pm b/fml/lib/IO/Adapter/RDBMS.pm index 328af9b2..5e529842 100644 --- a/fml/lib/IO/Adapter/RDBMS.pm +++ b/fml/lib/IO/Adapter/RDBMS.pm @@ -4,8 +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. # -# $Id$ -# $FML$ +# $FML: RDBMS.pm,v 1.8 2001/04/03 09:45:46 fukachan Exp $ # package IO::Adapter::RDBMS; @@ -19,21 +18,23 @@ IO::Adapter::RDBMS - IO with SQL servers =head1 SYNOPSIS -... not yet ... + ... not yet ... =head1 DESCRIPTION -... not yet ... + ... not yet ... =head1 METHODS =head2 C<configure($args)> -It forwards request to the specified subclass or DBI base class. +Configure object for C<dsn>. new({ driver => 'IO::Model::MySQL::toymodel', - }); + }); + +It forwards the request to the specified subclass or DBI base class. =cut diff --git a/fml/lib/IO/Adapter/UnixGroup.pm b/fml/lib/IO/Adapter/UnixGroup.pm index dfec77f1..4114728d 100644 --- a/fml/lib/IO/Adapter/UnixGroup.pm +++ b/fml/lib/IO/Adapter/UnixGroup.pm @@ -4,8 +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. # -# $Id$ -# $FML: UnixGroup.pm,v 1.11 2001/04/03 09:45:46 fukachan Exp $ +# $FML: UnixGroup.pm,v 1.12 2001/05/04 14:32:34 fukachan Exp $ # package IO::Adapter::UnixGroup; @@ -17,18 +16,6 @@ use IO::Adapter::Array; @ISA = qw(IO::Adapter::Array); -sub configure -{ - my ($self, $me) = @_; - my ($type) = ref($self) || $self; - - # emulate an array on memory - my (@x) = getgrnam( $me->{_name} ); - my (@elements) = split ' ', $x[3]; - $me->{_array_reference} = \@elements; -} - - =head1 NAME @@ -54,6 +41,27 @@ See L<IO::Adapter::Array> for more details. C<CAUTION: this map is read only>. +=head1 METHOD + +=head2 C<configure($obj)> + +Configure object for array IO operation. + +=cut + + +sub configure +{ + my ($self, $me) = @_; + my ($type) = ref($self) || $self; + + # emulate an array on memory + my (@x) = getgrnam( $me->{_name} ); + my (@elements) = split ' ', $x[3]; + $me->{_array_reference} = \@elements; +} + + =head1 SEE ALSO L<IO::Adapter::Array> |
