DTA::CAB::Server - abstract class for DTA::CAB servers
use DTA::CAB::Server; ##======================================================================== ## Constructors etc. $srv = CLASS_OR_OBJ->new(%args); undef = $srv->initialize(); ##======================================================================== ## Methods: Generic Server API $rc = $srv->prepare(); $rc = $srv->run(); $rc = $srv->finish(); ##-- low-level methods $rc = $srv->prepareSignalHandlers(); $rc = $srv->prepareLocal(@args_to_prepare);
DTA::CAB::Server inherits from DTA::CAB::Persistent and DTA::CAB::Logger.
$srv = CLASS_OR_OBJ->new(%args);
%args, %$srv:
##-- supported analyzers as => \%analyzers, ##-- ($name => $cab_analyzer_obj, ...) aos => \%anlOptions, ##-- ($name=>\%analyzeOptions, ...) : passed to $as{$name}->analyzeXYZ($xyz,%analyzeOptions) ## ##-- daemon mode support pidfile => $pidfile, ##-- write PID to file on prepare() pid => $pid, ##-- PID to write to $pidfile (default=$$)
undef = $srv->initialize();
Called to initialize new objects after new()
$rc = $srv->prepare();
Prepare server $srv to run. Default implementation initializes logger, writes $pidfile (if defined), and pre-loads each analyzer in values(%{$srv->{as}}) by calling that analyzers prepare() method.
$rc = $srv->prepareSignalHandlers();
Initialize signal handlers. Default implementation handles SIGHUP, SIGTERM, SIGKILL, and __DIE__.
$rc = $srv->prepareLocal(@args_to_prepare);
Dummy method for subclass-local initialization, called by "prepare"() after default "prepare"() guts have run.
$rc = $srv->run();
Run the server. No default implementation.
$rc = $srv->finish();
Cleanup method; should be called when server dies or after "run"() has completed. Default implementation unlinks $pidfile (if defined).
Bryan Jurish <moocow@cpan.org>
Copyright (C) 2009-2019 by Bryan Jurish
This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.24.1 or, at your option, any later version of Perl 5 you may have available.
To install DTA::CAB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DTA::CAB
CPAN shell
perl -MCPAN -e shell install DTA::CAB
For more information on module installation, please visit the detailed CPAN module installation guide.