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

Comparing AnyEvent-DBI/DBI.pm (file contents):
Revision 1.4 by root, Fri Jun 6 20:06:34 2008 UTC vs.
Revision 1.5 by root, Mon Jun 9 15:30:41 2008 UTC

3AnyEvent::DBI - asynchronous DBI access 3AnyEvent::DBI - asynchronous DBI access
4 4
5=head1 SYNOPSIS 5=head1 SYNOPSIS
6 6
7 use AnyEvent::DBI; 7 use AnyEvent::DBI;
8
9 my $cv = AnyEvent->condvar;
10
11 my $dbh = new AnyEvent::DBI "DBI:SQLite:dbname=test.db", "", "";
12
13 $dbh->exec ("select * from test where num=?", 10, sub {
14 my ($rows) = @_;
15
16 print "@$_\n"
17 for @$rows;
18
19 $cv->broadcast;
20 });
21
22 # asynchronously do sth. else here
23
24 $cv->wait;
8 25
9=head1 DESCRIPTION 26=head1 DESCRIPTION
10 27
11This module is an L<AnyEvent> user, you need to make sure that you use and 28This module is an L<AnyEvent> user, you need to make sure that you use and
12run a supported event loop. 29run a supported event loop.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines