Queue::Q4M is a simple Perl wrapper to q4m, which is an implementation of a queue using mysql.
SYNOPSIS
use Queue::Q4M;
my $q = Queue::Q4M- >connect(
connect_info = > [
'dbi:mysql:dbname=mydb',
$username,
$password
],
);
for (1..10) {
$q- >insert($table, \%fieldvals);
}
while ($q- >next($table)) {
my ($col1, $col2, $col3) = $q- >fetch($table, \@fields);
print "col1 = $col1, col2 = $col2, col3 = $col3\n";
}
while ($q- >next($table)) {
my $cols = $q- >fetch_arrayref($table, \@fields);
print "col1 = $cols- >[0], col2 = $cols- >[1], col3 = $cols- >[2]\n";
}
while ($q- >next($table)) {
my $cols = $q- >fetch_hashref($table, \@fields);
print "col1 = $cols- >{col1}, col2 = $cols- >{col2}, col3 = $cols- >{col3}\n";
}
# to use queue_wait(table_cond1,table_cond2,timeout)
while (my $which = $q- >next(@table_conds)) {
# $which contains the table name
}
$q- >disconnect;
Product's homepage
Requirements:
· Perl