1Daemon::Generic::AnyEveUnste(r3)Contributed Perl DocumenDtaaetmioonn::Generic::AnyEvent(3)
2
3
4

NAME

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

SYNOPSIS

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

DESCRIPTION

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

LICENSE

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