Maplat::Worker::BaseModule - base module for worker modules
This module is the base module any worker module should use.
When writing a new worker module, use this module as a base:
use Maplat::Worker::BaseModule; @ISA = ('Maplat::Worker::BaseModule');
This creates a new instance of this module. Do not call this function directly, use the "configure" call in Maplat::Worker.
This function needs to be overloaded in every worker module. This function is run during startup once some time after new(). Within this function (and ONLY within this function) you can call register_worker() to register cyclic functions.
This function is called some time after register() and may be called again while the worker is running. Everytime reload() is called, you should empty all cached data in this worker and reload it from the sources (if applicable).
This function registers a function of its own module as a cyclic worker function. It takes one argument, the name of the cyclic function, for example:
... sub register { $self->register_worker("doWork"); } ... sub doWork { # update file $bar with @foo ... }
It is possible to register multiple cyclic functions within the same worker module.
Register a callback for "cleanup" operations after a workcycle has been completed. This might for example be a function in a database module that makes sure there are no open transactions.
This module is not used directly and doesn't need configuration.
This module does not depend on other worker modules
Maplat::Worker
Rene Schickbauer, <rene.schickbauer@gmail.com>
Copyright (C) 2008-2011 by Rene Schickbauer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.
To install Maplat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Maplat
CPAN shell
perl -MCPAN -e shell install Maplat
For more information on module installation, please visit the detailed CPAN module installation guide.