IO Abstraction Layer (IO::Adapter Class)

fml 8 tutorial
Prev |  | Next

# Chapter 50. IO Abstraction Layer (IO::Adapter Class)

# IO::Adapter Overview

All IO of fml8 should use IO::Adapter class like vfs/vnode framework. For example, read/write member list, add/remove a user. The usage is like this:

    use IO::Adapter;
    $obj = new IO::Adapter $map, $map_params;
    $obj->open || croak("cannot open $map");
    while ($x = $obj->get_next_key()) { ... }
    $obj->close;

$map is map:identifier. file: can be omitted. Currently available maps follow:

    file:/var/spool/ml/elena/recipients
    unix.group:root
    nis.group:root
    mysql:id
    postgresql:id
    ldap:id

"file:" map is a normal file (text file). "unix.group:root" map is to read root entry in /etc/group file. "nis.group:root" map is to read root entry in NIS (YP). "mysql:id" map implies the use of MySQL. Parameters for MySQL access is defined in "mysql:id" entry. These paraemeters should be specified before calling "new IO::Adapter".

Prev | Home | Next
Modules | Up | IO::Adapter Methods

fml 8.0 (fml-devel) project homepage is www.fml.org/software/fml8/.
fml 4.0 project homepage is www.fml.org/software/fml4/.
about one floppy bsd routers, see www.bsdrouter.org/.
other free softwares are found at www.fml.org/software/.

author's homepage is www.fml.org/home/fukachan/.
Also, visit nuinui's world :) at www.nuinui.net.

For questions about FML, e-mail <fml-bugs@fml.org>.