1Daemon::Generic::Event(U3s)er Contributed Perl DocumentatDiaoenmon::Generic::Event(3)
2
3
4

NAME

6        Daemon::Generic::Event - Generic daemon framework with Event.pm
7

SYNOPSIS

9        use Daemon::Generic::Event;
10
11        @ISA = qw(Daemon::Generic::Event);
12
13        sub gd_preconfig {
14               # stuff
15        }
16

DESCRIPTION

18       Daemon::Generic::Event is a subclass of Daemon::Generic that predefines
19       some methods:
20
21       gd_run()       Setup a periodic callback to "gd_run_body()" if there is
22                      a "gd_run_body()".  Call "Event::loop()".
23
24       gd_setup_signals()
25                      Bind SIGHUP to call "gd_reconfig_event()".  Bind SIGINT
26                      to call "gd_quit_event()".
27
28       To use Daemon::Generic::Event, you have to provide a "gd_preconfig()"
29       method.   It can be empty if you have a "gd_run_body()".
30
31       Set up your own events in "gd_preconfig()" and "gd_postconfig()".
32
33       If you have a "gd_run_body()" method, it will be called once per second
34       or every "gd_interval()" seconds if you have a "gd_interval()" method.
35       Unlike in Daemon::Generic::While1, "gd_run_body()" should not include a
36       call to "sleep()".
37

LICENSE

39       Copyright (C) 2006-2010 David Muir Sharnoff <muir@idiom.com>.
40       Copyright (C) 2011 Google, Inc.  This module may be used and
41       distributed on the same terms as Perl itself.
42
43
44
45perl v5.32.0                      2020-07-28         Daemon::Generic::Event(3)
Impressum