Mischa Spiegelmock > Data-Queue-Persistent-0.13 > Data::Queue::Persistent

Download:
Data-Queue-Persistent-0.13.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.13   Source  

NAME ^

Data::Queue::Persistent - Perisistent database-backed queue

SYNOPSIS ^

  use Data::Queue::Persistent;
  my $q = Data::Queue::Persistent->new(
    table  => 'persistent_queue', # name to save queues in
    dsn    => 'dbi:SQLite:dbname=queue.db', # dsn for database to save queues
    id     => 'testqueue', # queue identifier
    cache  => 1,
    noload => 1, # don't load saved queue automatically
    max_size => 100, # limit to 100 items
  );
  $q->add('first', 'second', 'third', 'fourth');
  $q->remove;      # returns 'first'
  $q->remove(2);   # returns ('second', 'third')
  $q->empty;       # removes everything

DESCRIPTION ^

This is a simple module to keep a persistent queue around. It is just a normal implementation of a queue, except it is backed by a database so that when your program exits the data won't disappear.

EXPORT

None by default.

Methods

SEE ALSO ^

Any data structures book.

AUTHOR ^

Mischa Spiegelmock, <mspiegelmock@gmail.com>

COPYRIGHT AND LICENSE ^

Copyright (C) 2007 by Mischa Spiegelmock

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: