ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/BDB/BDB.pm
(Generate patch)

Comparing BDB/BDB.pm (file contents):
Revision 1.27 by root, Tue Dec 11 02:32:50 2007 UTC vs.
Revision 1.28 by root, Mon Dec 17 06:31:43 2007 UTC

23 | BDB::READ_UNCOMMITTED, 0600; 23 | BDB::READ_UNCOMMITTED, 0600;
24 db_put $db, undef, "key", "data", 0, sub { 24 db_put $db, undef, "key", "data", 0, sub {
25 db_del $db, undef, "key"; 25 db_del $db, undef, "key";
26 }; 26 };
27 db_sync $db; 27 db_sync $db;
28
29 # when you also use Coro, management is easy:
30 use Coro::BDB;
28 31
29 # automatic result processing with AnyEvent: 32 # automatic result processing with AnyEvent:
30 our $FH; open $FH, "<&=" . BDB::poll_fileno; 33 our $FH; open $FH, "<&=" . BDB::poll_fileno;
31 our $WATCHER = AnyEvent->io (fh => $FH, poll => 'r', cb => \&BDB::poll_cb); 34 our $WATCHER = AnyEvent->io (fh => $FH, poll => 'r', cb => \&BDB::poll_cb);
32 35
388 DESTROY (DBC_ornull *dbc) 391 DESTROY (DBC_ornull *dbc)
389 CODE: 392 CODE:
390 if (dbc) 393 if (dbc)
391 dbc->c_close (dbc); 394 dbc->c_close (dbc);
392 395
396 $int = $cursor->set_priority ($priority = PRIORITY_*)
397
393=head4 Example: 398=head4 Example:
394 399
395 my $c = $db->cursor; 400 my $c = $db->cursor;
396 401
397 for (;;) { 402 for (;;) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines