The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

MooseX::Q4MLog::CLI::Consume - Daemon Role To Consume Q4M Log

SYNOPSIS

  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

METHODS

get_config_from_file

Parses a YAML file to get the configuration out of a config file

run

Starts a loop that consumes the q4m log