| MooseX-Q4MLog documentation | view source | Contained in the MooseX-Q4MLog distribution. |
MooseX::Q4MLog::CLI::Consume - Daemon Role To Consume Q4M Log
package MyConsume;
use Moose;
with 'MooseX::Q4MLog::CLI::Consume';
no Moose;
sub consume {
my ($self, $data) = @_;
# do whatever you want with $data, which is a hashref
}
# myconsume.pl
use MyConsume;
my $app = MyConsume->new_with_options();
my ($command) = @{ $app->extra_argv };
if (! defined $command) {
die "no command specified";
}
$app->start if $command eq 'start';
# see MooseX::Daemonize for the rest
Parses a YAML file to get the configuration out of a config file
Starts a loop that consumes the q4m log
| MooseX-Q4MLog documentation | view source | Contained in the MooseX-Q4MLog distribution. |