Lines Matching defs:DB_File

1 # DB_File.pm -- Perl 5 interface to Berkeley DB
10 package DB_File::HASHINFO ;
18 @DB_File::HASHINFO::ISA = qw(Tie::Hash);
90 croak "DB_File::HASHINFO::DELETE - Unknown element '$key'" ;
113 package DB_File::RECNOINFO ;
118 @DB_File::RECNOINFO::ISA = qw(DB_File::HASHINFO) ;
131 package DB_File::BTREEINFO ;
136 @DB_File::BTREEINFO::ISA = qw(DB_File::HASHINFO) ;
157 package DB_File ;
185 $DB_BTREE = DB_File::BTREEINFO->new();
186 $DB_HASH = DB_File::HASHINFO->new();
187 $DB_RECNO = DB_File::RECNOINFO->new();
257 { XSLoader::load("DB_File", $VERSION)}
259 { DB_File->bootstrap( $VERSION ) }
503 sub ::DB_File::splice { &SPLICE }
596 DB_File - Perl5 access to Berkeley DB version 1.x
600 use DB_File;
602 [$X =] tie %hash, 'DB_File', [$filename, $flags, $mode, $DB_HASH] ;
603 [$X =] tie %hash, 'DB_File', $filename, $flags, $mode, $DB_BTREE ;
604 [$X =] tie @array, 'DB_File', $filename, $flags, $mode, $DB_RECNO ;
639 B<DB_File> is a module which allows Perl programs to make use of the
641 version of DB, see L<Using DB_File with Berkeley DB version 2 or greater>).
647 number of database formats. B<DB_File> provides an interface to all
665 B<DB_File> use it instead.
685 =head2 Using DB_File with Berkeley DB version 2 or greater
687 Although B<DB_File> is intended to be used with Berkeley DB version 1,
690 version 2 or greater interface differs, B<DB_File> arranges for it to work
691 like version 1. This feature allows B<DB_File> scripts that were built
701 Once you have rebuilt DB_File to use Berkeley DB version 2 or greater,
706 DB with DB_File.
710 B<DB_File> allows access to Berkeley DB files using the tie() mechanism
712 allows B<DB_File> to access Berkeley DB files using either an
735 This interface is handled slightly differently in B<DB_File>. Here is
736 an equivalent call using B<DB_File>:
738 tie %array, 'DB_File', $filename, $flags, $mode, $DB_HASH ;
746 hash object. B<DB_File> has three of these pre-defined references.
766 $a = DB_File::HASHINFO->new();
774 $b = DB_File::BTREEINFO->new();
784 $c = DB_File::RECNOINFO->new();
798 $a = DB_File::HASHINFO->new();
800 tie %y, 'DB_File', "filename", $flags, 0777, $a ;
804 to C functions. In B<DB_File> these keys are used to store references
846 tie %A, "DB_File", "filename" ;
850 tie %A, "DB_File", "filename", O_CREAT|O_RDWR, 0666, $DB_HASH ;
855 tie %A, "DB_File" ;
859 tie %A, "DB_File", undef, O_CREAT|O_RDWR, 0666, $DB_HASH ;
867 (that is, a C<(char *)0> in C) in place of the filename. B<DB_File>
873 file formats that B<DB_File> supports. It is also very straightforward
884 use DB_File ;
888 tie %h, "DB_File", "fruit", O_RDWR|O_CREAT, 0666, $DB_HASH
935 use DB_File ;
949 tie %h, "DB_File", "tree", O_RDWR|O_CREAT, 0666, $DB_BTREE
1033 use DB_File ;
1043 tie %h, "DB_File", $filename, O_RDWR|O_CREAT, 0666, $DB_BTREE
1088 use DB_File ;
1098 $x = tie %h, "DB_File", $filename, O_RDWR|O_CREAT, 0666, $DB_BTREE
1130 To make life easier when dealing with duplicate keys, B<DB_File> comes with
1160 use DB_File ;
1169 $x = tie %h, "DB_File", $filename, O_RDWR|O_CREAT, 0666, $DB_BTREE
1210 use DB_File ;
1219 $x = tie %h, "DB_File", $filename, O_RDWR|O_CREAT, 0666, $DB_BTREE
1249 use DB_File ;
1258 $x = tie %h, "DB_File", $filename, O_RDWR|O_CREAT, 0666, $DB_BTREE
1294 use DB_File ;
1311 $x = tie %h, "DB_File", $filename, O_RDWR|O_CREAT, 0666, $DB_BTREE
1384 about B<DB_File>? Well, the behavior defined in the quote above is
1385 quite useful, so B<DB_File> conforms to it.
1402 use DB_File ;
1408 tie @h, "DB_File", $filename, O_RDWR|O_CREAT, 0666, $DB_RECNO
1454 of methods are supplied with B<DB_File> to simulate the missing array
1497 use DB_File ;
1504 $H = tie @h, "DB_File", $file, O_RDWR|O_CREAT, 0666, $DB_RECNO
1628 $db = tie %hash, "DB_File", "filename" ;
1631 as B<DB_File> methods directly like this:
1640 use DB_File ;
1641 $db = tie %hash, "DB_File", "filename"
1650 close() and dbopen() itself. The B<DB_File> method interface to the
1670 the equivalent B<DB_File> method does exactly the same.
1681 $X = tie %x, 'DB_File', $filename, O_RDWR|O_CREAT, 0777, $DB_BTREE
1696 $X = tie %x, 'DB_File', $filename, O_RDWR|O_CREAT, 0777, $DB_BTREE
1869 use DB_File ;
1875 my $db = tie %hash, 'DB_File', $filename, O_CREAT|O_RDWR, 0666, $DB_HASH
1912 use DB_File ;
1918 my $db = tie %hash, 'DB_File', $filename, O_CREAT|O_RDWR, 0666, $DB_HASH
1938 B<DB_File> databases was to flock the filehandle returned from the "fd"
1945 $db = tie(%db, 'DB_File', 'foo.db', O_CREAT|O_RDWR, 0644)
1980 Here is the crux of the problem. A side-effect of opening the B<DB_File>
1985 say "A" and "B", both want to update the same B<DB_File> database
2009 B<DB_File> database, but it does illustrate why the technique should
2029 A B<DB_File> wrapper which creates copies of the database file for
2036 A B<DB_File> wrapper that has the ability to lock and unlock the database
2044 =item B<DB_File::Lock>
2046 An extremely lightweight B<DB_File> wrapper that simply flocks a lockfile
2079 use DB_File ;
2087 tie %hist_db, 'DB_File', $HISTORY
2121 Here is an example which illustrates the problem from a B<DB_File>
2124 use DB_File ;
2130 $X = tie %x, 'DB_File', 'tst.fil' , O_RDWR|O_TRUNC
2137 tie %x, 'DB_File', 'tst.fil' , O_RDWR|O_CREAT
2153 B<DB_File> destructor, DESTROY, will not be called until I<all>
2177 $X = tie %x, 'DB_File', 'tst.fil' , O_RDWR|O_CREAT
2185 If you look at the contents of a database file created by DB_File,
2200 =head2 How do I store complex data structures with DB_File?
2202 Although B<DB_File> cannot do this directly, there is a module which
2203 can layer transparently over B<DB_File> to accomplish this feat.
2220 use DB_File;
2223 my $db = tie %h, 'DB_File', '/tmp/try.db', O_CREAT|O_RDWR, 0666, $DB_BTREE;
2251 =head2 What does "Bareword 'DB_File' not allowed" mean?
2259 use DB_File ;
2261 tie %x, DB_File, "filename" ;
2265 Bareword "DB_File" not allowed while "strict subs" in use
2267 To get around the error, place the word C<DB_File> in either single or
2270 tie %x, "DB_File", "filename" ;
2277 Articles that are either about B<DB_File> or make use of it.
2304 L<https://github.com/pmqs/DB_File/issues> (preferred) or
2305 L<https://rt.cpan.org/Public/Dist/Display.html?Name=DB_File>.
2309 B<DB_File> comes with the standard Perl source distribution. Look in
2310 the directory F<ext/DB_File>. Given the amount of time between releases
2314 F<modules/by-module/DB_File>.
2316 B<DB_File> is designed to work with any version of Berkeley DB, but is limited to the functionality provided by
2332 Although B<DB_File> is covered by the Perl license, the library it
2345 The DB_File interface was written by Paul Marquess