GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Daemon::Generic::Event(3) User Contributed Perl Documentation Daemon::Generic::Event(3)

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

 use Daemon::Generic::Event;

 @ISA = qw(Daemon::Generic::Event);

 sub gd_preconfig {
        # stuff
 }

Daemon::Generic::Event 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()".

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.
2013-10-05 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.