summaryrefslogtreecommitdiff
path: root/fml/lib/IO
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-05-04 14:32:32 +0000
committerfukachan <fukachan>2001-05-04 14:32:32 +0000
commit149320fad450d354f755201015ae3826ee5d0fe6 (patch)
tree34d5d452336e31124a7b3309da21f95d2b0c0460 /fml/lib/IO
parentb4ef1b3d71ef5fab8342c22007066aa0d22267d7 (diff)
downloadfml8-149320fad450d354f755201015ae3826ee5d0fe6.tar.gz
fml8-149320fad450d354f755201015ae3826ee5d0fe6.tar.bz2
fml8-149320fad450d354f755201015ae3826ee5d0fe6.zip
rename class from IO::MapAdapter to IO::Adapter.
Diffstat (limited to 'fml/lib/IO')
-rw-r--r--fml/lib/IO/Adapter.pm (renamed from fml/lib/IO/MapAdapter.pm)14
-rw-r--r--fml/lib/IO/Adapter/File.pm12
-rw-r--r--fml/lib/IO/Adapter/MySQL.pm4
-rw-r--r--fml/lib/IO/Adapter/NIS.pm6
-rw-r--r--fml/lib/IO/Adapter/UnixGroup.pm6
-rwxr-xr-xfml/lib/IO/t/append.pl8
-rwxr-xr-xfml/lib/IO/t/array_map.pl6
-rwxr-xr-xfml/lib/IO/t/delete.pl8
-rwxr-xr-xfml/lib/IO/t/file_map.pl6
-rwxr-xr-xfml/lib/IO/t/file_map_getpos.pl6
-rwxr-xr-xfml/lib/IO/t/replace.pl8
-rwxr-xr-xfml/lib/IO/t/unixgroup_map.pl6
12 files changed, 45 insertions, 45 deletions
diff --git a/fml/lib/IO/MapAdapter.pm b/fml/lib/IO/Adapter.pm
index 28da523c..5d0453d6 100644
--- a/fml/lib/IO/MapAdapter.pm
+++ b/fml/lib/IO/Adapter.pm
@@ -5,10 +5,10 @@
# redistribute it and/or modify it under the same terms as Perl itself.
#
# $Id$
-# $FML: MapAdapter.pm,v 1.27 2001/04/08 13:25:39 fukachan Exp $
+# $FML: MapAdapter.pm,v 1.28 2001/04/15 08:41:59 fukachan Exp $
#
-package IO::MapAdapter;
+package IO::Adapter;
use vars qw(@ISA @ORIG_ISA $FirstTime);
use strict;
use Carp;
@@ -19,12 +19,12 @@ END {}
=head1 NAME
-IO::MapAdapter - adapter for several IO interfaces
+IO::Adapter - adapter for several IO interfaces
=head1 SYNOPSIS
- use IO::MapAdapter;
- $obj = new IO::MapAdapter ($map, $map_params);
+ use IO::Adapter;
+ $obj = new IO::Adapter ($map, $map_params);
$obj->open || croak("cannot open $map");
while ($x = $obj->getline) { ... }
$obj->close;
@@ -150,7 +150,7 @@ sub new
$pkg = 'IO::Adapter::LDAP';
}
else {
- my $s = "IO::MapAdapter::new: map='$map' is unknown.";
+ my $s = "IO::Adapter::new: map='$map' is unknown.";
error_set($me, $s);
}
}
@@ -384,7 +384,7 @@ redistribute it and/or modify it under the same terms as Perl itself.
=head1 HISTORY
-IO::MapAdapter appeared in fml5 mailing list driver package.
+IO::Adapter appeared in fml5 mailing list driver package.
See C<http://www.fml.org/> for more details.
=cut
diff --git a/fml/lib/IO/Adapter/File.pm b/fml/lib/IO/Adapter/File.pm
index 585209d8..4da370ac 100644
--- a/fml/lib/IO/Adapter/File.pm
+++ b/fml/lib/IO/Adapter/File.pm
@@ -5,7 +5,7 @@
# redistribute it and/or modify it under the same terms as Perl itself.
#
# $Id$
-# $FML: File.pm,v 1.20 2001/04/03 09:45:45 fukachan Exp $
+# $FML: File.pm,v 1.21 2001/04/08 13:25:40 fukachan Exp $
#
package IO::Adapter::File;
@@ -25,15 +25,15 @@ IO::Adapter::File - IO functions for a file
To read list
- use IO::MapAdapter;
- $obj = new IO::MapAdapter $map;
+ use IO::Adapter;
+ $obj = new IO::Adapter $map;
$obj->open || croak("cannot open $map");
while ($x = $obj->getline) { ... }
$obj->close;
To add the address
- $obj = new IO::MapAdapter $map;
+ $obj = new IO::Adapter $map;
$obj->add( $address );
To delete it
@@ -44,7 +44,7 @@ To delete it
=head1 DESCRIPTION
This module provides real IO functions for a file used in
-IO::MapAdapter.
+IO::Adapter.
The map is the fully path-ed file name or a file name with 'file:/'
prefix.
@@ -339,7 +339,7 @@ sub replace
=head1 SEE ALSO
-L<IO::MapAdapter>
+L<IO::Adapter>
=head1 AUTHOR
diff --git a/fml/lib/IO/Adapter/MySQL.pm b/fml/lib/IO/Adapter/MySQL.pm
index cbc97a96..ad006f92 100644
--- a/fml/lib/IO/Adapter/MySQL.pm
+++ b/fml/lib/IO/Adapter/MySQL.pm
@@ -22,7 +22,7 @@ IO::Adapter::MySQL - interface to talk with a MySQL server
=head1 SYNOPSIS
- use IO::MapAdapter;
+ use IO::Adapter;
my $map = 'mysql:toymodel';
my $map_params = {
@@ -39,7 +39,7 @@ IO::Adapter::MySQL - interface to talk with a MySQL server
},
};
- my $obj = new IO::MapAdapter ($map, $map_params);
+ my $obj = new IO::Adapter ($map, $map_params);
$obj->open();
$obj->add( 'rudo@nuinui.net' );
$obj->close();
diff --git a/fml/lib/IO/Adapter/NIS.pm b/fml/lib/IO/Adapter/NIS.pm
index 850ec4c4..1bf78f6a 100644
--- a/fml/lib/IO/Adapter/NIS.pm
+++ b/fml/lib/IO/Adapter/NIS.pm
@@ -5,7 +5,7 @@
# redistribute it and/or modify it under the same terms as Perl itself.
#
# $Id$
-# $FML$
+# $FML: NIS.pm,v 1.13 2001/04/03 09:45:46 fukachan Exp $
#
package IO::Adapter::NIS;
@@ -39,8 +39,8 @@ IO::Adapter::NIS - NIS map operations
$map = 'nis.group:fml';
- use IO::MapAdapter;
- $obj = new IO::MapAdapter $map;
+ use IO::Adapter;
+ $obj = new IO::Adapter $map;
$obj->open || croak("cannot open $map");
while ($x = $obj->getline) { ... }
$obj->close;
diff --git a/fml/lib/IO/Adapter/UnixGroup.pm b/fml/lib/IO/Adapter/UnixGroup.pm
index c9a4726c..dfec77f1 100644
--- a/fml/lib/IO/Adapter/UnixGroup.pm
+++ b/fml/lib/IO/Adapter/UnixGroup.pm
@@ -5,7 +5,7 @@
# redistribute it and/or modify it under the same terms as Perl itself.
#
# $Id$
-# $FML$
+# $FML: UnixGroup.pm,v 1.11 2001/04/03 09:45:46 fukachan Exp $
#
package IO::Adapter::UnixGroup;
@@ -38,8 +38,8 @@ IO::Adapter::UnixGroup - IO wrapper to read /etc/group
$map = 'unix.group:fml';
- use IO::MapAdapter;
- $obj = new IO::MapAdapter $map;
+ use IO::Adapter;
+ $obj = new IO::Adapter $map;
$obj->open || croak("cannot open $map");
while ($x = $obj->getline) { ... }
$obj->close;
diff --git a/fml/lib/IO/t/append.pl b/fml/lib/IO/t/append.pl
index 86a6b8e5..dba8aa2b 100755
--- a/fml/lib/IO/t/append.pl
+++ b/fml/lib/IO/t/append.pl
@@ -5,7 +5,7 @@
# redistribute it and/or modify it under the same terms as Perl itself.
#
# $Id$
-# $FML$
+# $FML: append.pl,v 1.3 2001/04/03 09:45:47 fukachan Exp $
#
use strict;
@@ -24,8 +24,8 @@ print "${map}->add() ";
system "cp $org_file /tmp/";
# append
-use IO::MapAdapter;
-my $obj = new IO::MapAdapter $map;
+use IO::Adapter;
+my $obj = new IO::Adapter $map;
$obj->add( $buffer ) || croak("cannot add to $map");
if ($obj->error) { croak( $obj->error );}
@@ -46,7 +46,7 @@ else {
$map = 'unix.group:fml';
print "${map}->add() ... ";
-$obj = new IO::MapAdapter $map;
+$obj = new IO::Adapter $map;
eval q{ $obj->add( $buffer ); };
if ($@) {
print "ok\n"; # XXX fail (non null $@) is ok here.
diff --git a/fml/lib/IO/t/array_map.pl b/fml/lib/IO/t/array_map.pl
index 4fc14578..aced3a8b 100755
--- a/fml/lib/IO/t/array_map.pl
+++ b/fml/lib/IO/t/array_map.pl
@@ -5,7 +5,7 @@
# redistribute it and/or modify it under the same terms as Perl itself.
#
# $Id$
-# $FML$
+# $FML: array_map.pl,v 1.2 2001/04/03 09:45:47 fukachan Exp $
#
use Carp;
@@ -13,8 +13,8 @@ use strict;
my $map = ['a', 'b', 'c'];
-use IO::MapAdapter;
-my $obj = new IO::MapAdapter $map;
+use IO::Adapter;
+my $obj = new IO::Adapter $map;
$obj->open || croak("cannot open $map");
if ($obj->error) { croak( $obj->error );}
diff --git a/fml/lib/IO/t/delete.pl b/fml/lib/IO/t/delete.pl
index d2749e1f..18a5660e 100755
--- a/fml/lib/IO/t/delete.pl
+++ b/fml/lib/IO/t/delete.pl
@@ -5,7 +5,7 @@
# redistribute it and/or modify it under the same terms as Perl itself.
#
# $Id$
-# $FML$
+# $FML: delete.pl,v 1.2 2001/04/03 09:45:47 fukachan Exp $
#
use strict;
@@ -25,8 +25,8 @@ system "head -1 $org_file > $tmpf";
system "cp $org_file /tmp/";
# append
-use IO::MapAdapter;
-my $obj = new IO::MapAdapter $map;
+use IO::Adapter;
+my $obj = new IO::Adapter $map;
$obj->delete( $buffer ) || croak("cannot add to $map");
if ($obj->error) { croak( $obj->error );}
@@ -46,7 +46,7 @@ else {
$map = 'unix.group:fml';
print "${map}->delete() ... ";
-$obj = new IO::MapAdapter $map;
+$obj = new IO::Adapter $map;
eval q{ $obj->delete( $buffer ); };
if ($@) {
print "ok\n"; # XXX fail (non null $@) is ok here.
diff --git a/fml/lib/IO/t/file_map.pl b/fml/lib/IO/t/file_map.pl
index c2aef106..9e4b3f3d 100755
--- a/fml/lib/IO/t/file_map.pl
+++ b/fml/lib/IO/t/file_map.pl
@@ -5,7 +5,7 @@
# redistribute it and/or modify it under the same terms as Perl itself.
#
# $Id$
-# $FML$
+# $FML: file_map.pl,v 1.3 2001/04/03 09:45:47 fukachan Exp $
#
use Carp;
@@ -21,8 +21,8 @@ while (1) {
}
close($file);
-use IO::MapAdapter;
-$obj = new IO::MapAdapter $map;
+use IO::Adapter;
+$obj = new IO::Adapter $map;
$obj->open || croak("cannot open $map");
if ($obj->error) { croak( $obj->error );}
while ($x = $obj->getline) { $buf .= $x; }
diff --git a/fml/lib/IO/t/file_map_getpos.pl b/fml/lib/IO/t/file_map_getpos.pl
index 2ed778ad..910e033f 100755
--- a/fml/lib/IO/t/file_map_getpos.pl
+++ b/fml/lib/IO/t/file_map_getpos.pl
@@ -5,7 +5,7 @@
# redistribute it and/or modify it under the same terms as Perl itself.
#
# $Id$
-# $FML$
+# $FML: file_map_getpos.pl,v 1.4 2001/04/03 09:45:47 fukachan Exp $
#
use strict;
@@ -17,8 +17,8 @@ my $map = "file:". $file;
print STDERR "roll back test\n" if $debug;
-use IO::MapAdapter;
-my $obj = new IO::MapAdapter $map;
+use IO::Adapter;
+my $obj = new IO::Adapter $map;
$obj->open || croak("cannot open $map");
if ($obj->error) { croak( $obj->error );}
diff --git a/fml/lib/IO/t/replace.pl b/fml/lib/IO/t/replace.pl
index 111abb57..ff9a71bd 100755
--- a/fml/lib/IO/t/replace.pl
+++ b/fml/lib/IO/t/replace.pl
@@ -5,7 +5,7 @@
# redistribute it and/or modify it under the same terms as Perl itself.
#
# $Id$
-# $FML$
+# $FML: replace.pl,v 1.2 2001/04/03 09:45:47 fukachan Exp $
#
use strict;
@@ -26,8 +26,8 @@ system "sed 1d $org_file > $tmpf";
system "cp $org_file /tmp/";
# append
-use IO::MapAdapter;
-my $obj = new IO::MapAdapter $map;
+use IO::Adapter;
+my $obj = new IO::Adapter $map;
$obj->replace( $regexp, $value ) || croak("cannot add to $map");
if ($obj->error) { croak( $obj->error );}
@@ -47,7 +47,7 @@ else {
$map = 'unix.group:fml';
print "${map}->replace() ... ";
-$obj = new IO::MapAdapter $map;
+$obj = new IO::Adapter $map;
eval q{ $obj->replace( $regexp, $value ); };
if ($@) {
print "ok\n"; # XXX fail (non null $@) is ok here.
diff --git a/fml/lib/IO/t/unixgroup_map.pl b/fml/lib/IO/t/unixgroup_map.pl
index c4ef7719..ea2c1f05 100755
--- a/fml/lib/IO/t/unixgroup_map.pl
+++ b/fml/lib/IO/t/unixgroup_map.pl
@@ -5,7 +5,7 @@
# redistribute it and/or modify it under the same terms as Perl itself.
#
# $Id$
-# $FML$
+# $FML: unixgroup_map.pl,v 1.3 2001/04/03 09:45:47 fukachan Exp $
#
use Carp;
@@ -16,8 +16,8 @@ my $map = 'unix.group:wheel';
my @group = getgrnam( 'wheel' );
my @member = split(/\s+/,$group[3]);
-use IO::MapAdapter;
-my $obj = new IO::MapAdapter $map;
+use IO::Adapter;
+my $obj = new IO::Adapter $map;
$obj->open || croak("cannot open $map");
if ($obj->error) { croak( $obj->error );}