NAME

Module::Build::Service::Base - Base class for service implementations

VERSION

version 0.91

SYNOPSIS

  package Module::Build::Service::foo;

  use Moo;
  extends 'Module::Build::Service::Base';
  sub _build_log { ',,foo.log' }

DESCRIPTION

This is the base class for all services defined for Module::Build::Service::*.

Each service based on this class will, at runtime, look for various hooks to be defined in the user's subclass of Module::Build::Service, and run them at the appropriate time.

The hooks are:

SERVICE_service_name_pre_start_hook
SERVICE_service_name_post_start_hook
SERVICE_service_name_pre_stop_hook
SERVICE_service_name_post_stop_hook

ATTRIBUTES

log

Where to log output from the service executable. Defaults to _build/mbs/log/<service_name>.log.

service_name

A sensible identifier for the service. Defaults to the name of the package after removing Module::Build::Service::

For each attribute, you can either pass in a value when instantiating the object, or you can define a _build_<attribute> subroutine that will provide (or calculate) the appropriate value.

METHODS

run_process

Run the given command line (with a fully qualified binary), and return the result, as well as any output.

AUTHOR

Michael Alan Dorman <mdorman@ironicdesign.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Ironic Design, Inc..

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.