• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/db-4.8.30/perl/DB_File/

Lines Matching defs:DB_File

0 # DB_File.pm -- Perl 5 interface to Berkeley DB 
12 package DB_File::HASHINFO ;
20 @DB_File::HASHINFO::ISA = qw(Tie::Hash);
92 croak "DB_File::HASHINFO::DELETE - Unknown element '$key'" ;
115 package DB_File::RECNOINFO ;
120 @DB_File::RECNOINFO::ISA = qw(DB_File::HASHINFO) ;
133 package DB_File::BTREEINFO ;
138 @DB_File::BTREEINFO::ISA = qw(DB_File::HASHINFO) ;
159 package DB_File ;
179 $DB_BTREE = new DB_File::BTREEINFO ;
180 $DB_HASH = new DB_File::HASHINFO ;
181 $DB_RECNO = new DB_File::RECNOINFO ;
252 { XSLoader::load("DB_File", $VERSION)}
254 { bootstrap DB_File $VERSION }
500 sub ::DB_File::splice { &SPLICE }
579 DB_File - Perl5 access to Berkeley DB version 1.x
583 use DB_File;
585 [$X =] tie %hash, 'DB_File', [$filename, $flags, $mode, $DB_HASH] ;
586 [$X =] tie %hash, 'DB_File', $filename, $flags, $mode, $DB_BTREE ;
587 [$X =] tie @array, 'DB_File', $filename, $flags, $mode, $DB_RECNO ;
622 B<DB_File> is a module which allows Perl programs to make use of the
624 version of DB, see L<Using DB_File with Berkeley DB version 2 or greater>).
630 number of database formats. B<DB_File> provides an interface to all
648 B<DB_File> use it instead.
668 =head2 Using DB_File with Berkeley DB version 2 or greater
670 Although B<DB_File> is intended to be used with Berkeley DB version 1,
673 version 2 or greater interface differs, B<DB_File> arranges for it to work
674 like version 1. This feature allows B<DB_File> scripts that were built
684 Once you have rebuilt DB_File to use Berkeley DB version 2 or greater,
689 DB with DB_File.
693 B<DB_File> allows access to Berkeley DB files using the tie() mechanism
695 allows B<DB_File> to access Berkeley DB files using either an
718 This interface is handled slightly differently in B<DB_File>. Here is
719 an equivalent call using B<DB_File>:
721 tie %array, 'DB_File', $filename, $flags, $mode, $DB_HASH ;
729 hash object. B<DB_File> has three of these pre-defined references.
749 $a = new DB_File::HASHINFO ;
757 $b = new DB_File::BTREEINFO ;
767 $c = new DB_File::RECNOINFO ;
781 $a = new DB_File::HASHINFO ;
783 tie %y, 'DB_File', "filename", $flags, 0777, $a ;
787 to C functions. In B<DB_File> these keys are used to store references
829 tie %A, "DB_File", "filename" ;
833 tie %A, "DB_File", "filename", O_CREAT|O_RDWR, 0666, $DB_HASH ;
838 tie %A, "DB_File" ;
842 tie %A, "DB_File", undef, O_CREAT|O_RDWR, 0666, $DB_HASH ;
850 (that is, a C<(char *)0> in C) in place of the filename. B<DB_File>
856 file formats that B<DB_File> supports. It is also very straightforward
867 use DB_File ;
871 tie %h, "DB_File", "fruit", O_RDWR|O_CREAT, 0666, $DB_HASH
918 use DB_File ;
932 tie %h, "DB_File", "tree", O_RDWR|O_CREAT, 0666, $DB_BTREE
1016 use DB_File ;
1026 tie %h, "DB_File", $filename, O_RDWR|O_CREAT, 0666, $DB_BTREE
1071 use DB_File ;
1081 $x = tie %h, "DB_File", $filename, O_RDWR|O_CREAT, 0666, $DB_BTREE
1113 To make life easier when dealing with duplicate keys, B<DB_File> comes with
1143 use DB_File ;
1152 $x = tie %h, "DB_File", $filename, O_RDWR|O_CREAT, 0666, $DB_BTREE
1193 use DB_File ;
1202 $x = tie %h, "DB_File", $filename, O_RDWR|O_CREAT, 0666, $DB_BTREE
1232 use DB_File ;
1241 $x = tie %h, "DB_File", $filename, O_RDWR|O_CREAT, 0666, $DB_BTREE
1277 use DB_File ;
1294 $x = tie %h, "DB_File", $filename, O_RDWR|O_CREAT, 0666, $DB_BTREE
1367 about B<DB_File>? Well, the behavior defined in the quote above is
1368 quite useful, so B<DB_File> conforms to it.
1385 use DB_File ;
1391 tie @h, "DB_File", $filename, O_RDWR|O_CREAT, 0666, $DB_RECNO
1437 of methods are supplied with B<DB_File> to simulate the missing array
1480 use DB_File ;
1487 $H = tie @h, "DB_File", $file, O_RDWR|O_CREAT, 0666, $DB_RECNO
1611 $db = tie %hash, "DB_File", "filename" ;
1614 as B<DB_File> methods directly like this:
1623 use DB_File ;
1624 $db = tie %hash, "DB_File", "filename"
1633 close() and dbopen() itself. The B<DB_File> method interface to the
1653 the equivalent B<DB_File> method does exactly the same.
1664 $X = tie %x, 'DB_File', $filename, O_RDWR|O_CREAT, 0777, $DB_BTREE
1679 $X = tie %x, 'DB_File', $filename, O_RDWR|O_CREAT, 0777, $DB_BTREE
1831 use DB_File ;
1837 my $db = tie %hash, 'DB_File', $filename, O_CREAT|O_RDWR, 0666, $DB_HASH
1874 use DB_File ;
1880 my $db = tie %hash, 'DB_File', $filename, O_CREAT|O_RDWR, 0666, $DB_HASH
1900 B<DB_File> databases was to flock the filehandle returned from the "fd"
1907 $db = tie(%db, 'DB_File', 'foo.db', O_CREAT|O_RDWR, 0644)
1942 Here is the crux of the problem. A side-effect of opening the B<DB_File>
1947 say "A" and "B", both want to update the same B<DB_File> database
1971 B<DB_File> database, but it does illustrate why the technique should
1991 A B<DB_File> wrapper which creates copies of the database file for
1998 A B<DB_File> wrapper that has the ability to lock and unlock the database
2006 =item B<DB_File::Lock>
2008 An extremely lightweight B<DB_File> wrapper that simply flocks a lockfile
2041 use DB_File ;
2049 tie %hist_db, 'DB_File', $HISTORY
2083 Here is an example which illustrates the problem from a B<DB_File>
2086 use DB_File ;
2092 $X = tie %x, 'DB_File', 'tst.fil' , O_RDWR|O_TRUNC
2099 tie %x, 'DB_File', 'tst.fil' , O_RDWR|O_CREAT
2115 B<DB_File> destructor, DESTROY, will not be called until I<all>
2139 $X = tie %x, 'DB_File', 'tst.fil' , O_RDWR|O_CREAT
2147 If you look at the contents of a database file created by DB_File,
2162 =head2 How do I store complex data structures with DB_File?
2164 Although B<DB_File> cannot do this directly, there is a module which
2165 can layer transparently over B<DB_File> to accomplish this feat.
2190 =head2 What does "Bareword 'DB_File' not allowed" mean?
2198 use DB_File ;
2200 tie %x, DB_File, "filename" ;
2204 Bareword "DB_File" not allowed while "strict subs" in use
2206 To get around the error, place the word C<DB_File> in either single or
2209 tie %x, "DB_File", "filename" ;
2216 Articles that are either about B<DB_File> or make use of it.
2242 B<DB_File> comes with the standard Perl source distribution. Look in
2243 the directory F<ext/DB_File>. Given the amount of time between releases
2247 F<modules/by-module/DB_File>.
2249 This version of B<DB_File> will work with either version 1.x, 2.x or
2269 Although B<DB_File> is covered by the Perl license, the library it
2286 Berkeley DB authors or the author of DB_File. See L<"AUTHOR"> for details.
2296 The DB_File interface was written by Paul Marquess