• Aucun résultat trouvé

SEE ALSO

N/A
N/A
Protected

Academic year: 2022

Partager "SEE ALSO"

Copied!
2
0
0

Texte intégral

(1)

Perl version 5.10.0 documentation - AnyDBM_File

Page 1 http://perldoc.perl.org

NAME

AnyDBM_File - provide framework for multiple DBMs

NDBM_File, DB_File, GDBM_File, SDBM_File, ODBM_File - various DBM implementations

SYNOPSIS

use AnyDBM_File;

DESCRIPTION

This module is a "pure virtual base class"--it has nothing of its own. It's just there to inherit from one of the various DBM packages. It prefers ndbm for compatibility reasons with Perl 4, then Berkeley DB (See DB_File), GDBM, SDBM (which is always there--it comes with Perl), and finally ODBM. This way old programs that used to use NDBM via dbmopen() can still do so, but new ones can reorder @ISA:

BEGIN { @AnyDBM_File::ISA = qw(DB_File GDBM_File NDBM_File) } use AnyDBM_File;

Having multiple DBM implementations makes it trivial to copy database formats:

use POSIX; use NDBM_File; use DB_File;

tie %newhash, 'DB_File', $new_filename, O_CREAT|O_RDWR;

tie %oldhash, 'NDBM_File', $old_filename, 1, 0;

%newhash = %oldhash;

DBM Comparisons

Here's a partial table of features the different packages offer:

odbm ndbm sdbm gdbm bsd-db ---- ---- ---- ---- ---

Linkage comes w/ perl yes yes yes yes yes Src comes w/ perl no no yes no no Comes w/ many unix os yes yes[0] no no no Builds ok on !unix ? ? yes yes ? Code Size ? ? small big big Database Size ? ? small big? ok[1]

Speed ? ? slow ok fast FTPable no no yes yes yes Easy to build N/A N/A yes yes ok[2]

Size limits 1k 4k 1k[3] none none Byte-order independent no no no no yes Licensing restrictions ? ? no yes no

[0]

on mixed universe machines, may be in the bsd compat library, which is often shunned.

[1]

Can be trimmed if you compile for one access method.

[2]

See DB_File. Requires symbolic links.

[3]

By default, but can be redefined.

(2)

Perl version 5.10.0 documentation - AnyDBM_File

Page 2 http://perldoc.perl.org

SEE ALSO

dbm(3), ndbm(3), DB_File(3), perldbmfilter

Références

Documents relatifs

The following options are supported: center, date, fixed, fixedbold, fixeditalic, fixedbolditalic, quotes, release, section. (Those options are explained in Pod::Man.)

If Perldoc is running under MSWin and uses this class as a formatter, the output will be opened with write.exe or whatever program is specified in the environment variable

It supports the following options, which are explained in Pod::Text: alt, indent, loose, quotes, sentence, width.

simple-minded version of Pod::Simple::Text that formats only the "Pod Errors" section (if Pod::Simple even generates one for the given document). This is a subclass

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular

Pod::Simple::XMLOutStream's output is space-padded in a way that's better for sending to an XML processor (that is, it has no ignoreable whitespace). But

As an example, if POSIX.pm is located in /usr/local/lib/perl5/POSIX.pm, AutoLoader will look for perl subroutines POSIX in /usr/local/lib/perl5/auto/POSIX/*.al, where the .al file

This works like <$fh> described in "I/O Operators" in perlop except that it's more readable and can be safely called in a list context but still returns just one