Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Daemon::Generic::AnyEvUser3Contributed Perl DocumeDaemon::Generic::AnyEvent(3)

NAME
	Daemon::Generic::AnyEvent - 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:

       gd_run()	      Setup a periodic callback	to "gd_run_body()" if there is
		      a	"gd_run_body()".  Call "Event::loop()".

       gd_setup_signals()
		      Bind SIGHUP to call "gd_reconfig_event()".  Bind SIGINT
		      to call "gd_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()".

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.

perl v5.32.0			  2013-10-05	  Daemon::Generic::AnyEvent(3)

NAME | SYNOPSIS | DESCRIPTION | LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Daemon::Generic::AnyEvent&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help