Daemon:...::Event(3)
π NAME π
okay so this page is Daemon:...::Event(3) from the User Contributed Perl Documentation collection, and it's all about Daemon::Generic::Event β a generic daemon framework with Event.pm. slay.
β¨ SYNOPSIS β¨
bestie, the setup looks like this:
use Daemon::Generic::Event;
@ISA = qw(Daemon::Generic::Event);
sub gd_preconfig {
# stuff
}
πΈ DESCRIPTION πΈ
Daemon::Generic::Event is a subclass of Daemon::Generic that predefines some methods, and honestly? iconic:
gd_run()β sets up a periodic callback togd_run_body()if there is agd_run_body(). Then it callsEvent::loop().gd_setup_signals()β bindsSIGHUPto callgd_reconfig_event(). BindsSIGINTto callgd_quit_event().
To use Daemon::Generic::Event, you have to provide a gd_preconfig() method. It can be empty if you have a gd_run_body().
Set up your own events in gd_preconfig() and gd_postconfig().
If you have a gd_run_body() method, it will be called once per second β or every gd_interval() seconds if you have a gd_interval() method. Unlike in Daemon::Generic::While1, gd_run_body() should not include a call to sleep(). no cap, leave the sleeping to the framework π
π LICENSE π
Copyright (C) 2006-2010 David Muir Sharnoff <muir@idiom.com>. Copyright (C) 2011 Google, Inc. This module may be used and distributed on the same terms as Perl itself.
okay bye bestie π«Ά this page was served by perl v5.42.0, dated 2017-07-17. periodt β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Daemon-Generic 0.85-bp160.1.11 Β· Artistic-1.0 or GPL-1.0+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms