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
To install MooseX::Q4MLog, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooseX::Q4MLog
CPAN shell
perl -MCPAN -e shell install MooseX::Q4MLog
For more information on module installation, please visit the detailed CPAN module installation guide.