diff options
| author | fukachan <fukachan> | 2002-08-21 14:28:47 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-08-21 14:28:47 +0000 |
| commit | ee16c2cd520c4b1c0e98ab4801b7e19dca4db3ef (patch) | |
| tree | 702adb5a268e41d3dc90ff17f341781408b09ba9 /fml/lib/IO | |
| parent | 1bb4d49c04b857ab4afd87c162c56db94dd36756 (diff) | |
| download | fml8-ee16c2cd520c4b1c0e98ab4801b7e19dca4db3ef.tar.gz fml8-ee16c2cd520c4b1c0e98ab4801b7e19dca4db3ef.tar.bz2 fml8-ee16c2cd520c4b1c0e98ab4801b7e19dca4db3ef.zip | |
enhance add() to add($address, [$argv])
Diffstat (limited to 'fml/lib/IO')
| -rw-r--r-- | fml/lib/IO/Adapter.pm | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/fml/lib/IO/Adapter.pm b/fml/lib/IO/Adapter.pm index e38a8147..d2be6aed 100644 --- a/fml/lib/IO/Adapter.pm +++ b/fml/lib/IO/Adapter.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: Adapter.pm,v 1.19 2002/07/24 09:29:53 fukachan Exp $ +# $FML: Adapter.pm,v 1.20 2002/07/24 11:05:49 fukachan Exp $ # package IO::Adapter; @@ -325,28 +325,30 @@ for C<file> map. It return the next element of the array, in C<array_reference>, C<unix.group>, C<nis.grouop> maps. -=head2 C<add( $address )> +=head2 C<add( $address, [$argv] )> add $address to the specified map. -=head2 C<delete( $regexp )> +Optionally, you can add KEY=>VALUE structures such as + $address => STR +or + $address => [ STR1, STR2, ... ]. -delete lines which matches $regexp from this map. -=head2 C<replace( $regexp, $value )> +=head2 C<delete( $address )> -replace lines which matches $regexp with $value. +delete lines which matches $regexp from this map. =cut # Descriptions: add $address to the current map -# Arguments: OBJ($self) STR($address) +# Arguments: OBJ($self) STR($address) VARARGS($argv) # Side Effects: modify map content # Return Value: same as add() sub add { - my ($self, $address) = @_; + my ($self, $address, $argv) = @_; if ($self->{ _hints }->{ read_only }) { my $map = $self->{ _map }; @@ -354,7 +356,7 @@ sub add } if ($self->can('add')) { - $self->SUPER::add($address); + $self->SUPER::add($address, $argv); } else { $self->error_set("Error: add() method is not supported."); |
