Any-Daemon

 view release on metacpan or  search on metacpan

lib/Any/Daemon.pod  view on Meta::CPAN

=encoding utf8

=head1 NAME

Any::Daemon - basic needs for a daemon

=head1 INHERITANCE

 Any::Daemon is extended by
   Any::Daemon::HTTP

=head1 SYNOPSIS

  use Any::Daemon;
  use Log::Report;

  # Prepare a daemon for the Operating System
  my $daemon = Any::Daemon->new(@os_opts);

  # Start logging to syslog (see Log::Report::Dispatcher)
  dispatcher SYSLOG => 'syslog';

  # Run managing daemon
  $daemon->run(@run_opts);

=head1 DESCRIPTION

This module delivers the basic needs for any daemon on UNIX systems.
There are other standard daemon implementations available on CPAN,
with as main common difference that this module is not dedicated to a
specific task. By using Log::Report, you can easily redirect error
reports to any logging mechanism you like.

The code for this module is in use for many different daemons, some
with heavy load (a few dozen requests per second)  Have a look in
the examples directory!  Also, you may like L<Any::Daemon::HTTP|Any::Daemon::HTTP>

=head1 METHODS

=head2 Constructors

=over 4

=item Any::Daemon-E<gt>B<new>(%options)

With C<new()> you provide the operating system integration %options,
where C<run()> gets the activity related parameters: the real action.

Be warned that the user, group, and workdir will not immediately be
effected: delayed until L<run()|Any::Daemon/"Action">.

 -Option  --Default
  group     undef
  pid_file  undef
  user      undef
  workdir   current working directory

=over 2

=item group => GID|GROUPNAME



( run in 1.228 second using v1.01-cache-2.11-cpan-39bf76dae61 )