Daemon:...AnyEvent(3)
β¨ NAME β¨
okay bestie, this is the User Contributed Perl Documentation page for Daemon:...AnyEvent(3) π and the module is Daemon::Generic::AnyEvent β literally a generic daemon framework with AnyEvent.pm πΈ.
π¦ SYNOPSIS π¦
use Daemon::Generic::AnyEvent;
use Some::Event::Loop::Supported::By::AnyEvent;
@ISA = qw(Daemon::Generic::AnyEvent);
sub gd_preconfig {
# stuff
}
π DESCRIPTION π
Daemon::Generic::AnyEvent is a subclass of Daemon::Generic that predefines some methods, and honestly? iconic behavior π.
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().
bestie, fr fr: nosleep()ingd_run_body()here π
π 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 whole vibe was brought to you by perl v5.42.0, dated 2017-07-17, and it's the Daemon:...AnyEvent(3) page β slay π
β¨
π¦ 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