ead1 DEPENDENCIES
The C<Forks::Queue> module and all its current implementations require
the L<JSON|JSON> module.
=head1 SEE ALSO
L<Thread::Queue|Thread::Queue>, L<File::Queue|File::Queue>,
L<Queue
package Forks::Queue::SQLite;
use strict;
use warnings;
use Carp;
use JSON;
use DBI;
use DBD::SQLite;
use Time::HiRes 'time';
use base 'Forks::Queue';
use 5.010; # implementation contains // //=
UG;
*XDEBUG = \$Forks::Queue::XDEBUG;
$SIG{IO} = sub { } if $Forks::Queue::NOTIFY_OK;
our $jsonizer = JSON->new->allow_nonref(1)->ascii(1);
sub new {
my $class = shift;
my %opts = (%Forks::
call begin_work/commit from the caller
my ($self,$item,$timestamp,$id) = @_;
my $jitem = $jsonizer->encode($item);
my $dbh = $self->_dbh;
my $sth = $dbh->prepare("INSERT INTO the_queue
package Forks::Queue::File;
use strict;
use warnings;
use Carp;
use JSON;
use Time::HiRes;
use base 'Forks::Queue';
use 5.010; # sorry, v5.08. I love the // //= operators too much
our $VERSION =
;
# prefer functional JSON calls because we still want to use JSON
# during global destruction, and a JSON object might not be available
# then
sub jsonize {
JSON::to_json($_[0], { allow_nonref=
>1, ascii=>1 } );
}
sub dejsonize {
JSON::from_json($_[0], { allow_nonref => 1, ascii => 1 } );
}
# if we exercise firm control over line endings,
# we won't have any DOS vs Unix vs Mac fights.