1MooseX::Daemonize::WithUPsiedrFiCloen(t3r)ibuted Perl DoMcouomseenXt:a:tDiaoenmonize::WithPidFile(3)
2
3
4
6 MooseX::Daemonize::WithPidFile - A Role with the core daemonization and
7 pidfile management
8
10 package My::Daemon;
11 use Moose;
12
13 with 'MooseX::Daemonize::WithPidFile';
14
15 sub start {
16 my $self = shift;
17 # daemonize me ...
18 $self->daemonize; # << this will write the pidfile for you
19 # return from the parent,...
20 return unless $self->is_daemon;
21 # but continue on in the child (daemon)
22 }
23
25 This is a slightly extended basic daemonization Role, it provides
26 Pidfile management along with the core daemonization features found in
27 MooseX::Daemonize::Core.
28
30 pidfile (is = rw, isa => MooseX::Daemonize::Pid::File)>
31 This attribute holds the MooseX::Daemonize::Pid::File object used
32 to manage the Pidfile. It will initialize the object using the
33 "init_pidfile" method (which is required by this role).
34
36 init_pidfile
37 This method is used to build the pidfile attribute's object. It
38 should return a MooseX::Daemonize::Pid::File object.
39
40 has_pidfile
41 This is a predicate method to tell you if your pidfile attribute
42 has been initialized yet.
43
45 daemonize
46 This adds an "after" method modifier to the "daemonize" method
47 (from MooseX::Daemonize::Core) and handles writing your Pidfile for
48 you.
49
50 meta
51 The "meta()" method from Class::MOP::Class
52
54 Moose::Role, MooseX::Getopt and MooseX::Daemonize::Pid::File
55
57 None reported.
58
60 No bugs have been reported.
61
62 Please report any bugs or feature requests to
63 "bug-acme-dahut-call@rt.cpan.org", or through the web interface at
64 <http://rt.cpan.org>.
65
67 Stevan Little "<stevan.little@iinteractive.com>"
68
70 Copyright (c) 2007-2008, Chris Prather "<perigrin@cpan.org>". All
71 rights reserved.
72
73 Portions heavily borrowed from Proc::Daemon which is copyright Earl
74 Hood.
75
76 This module is free software; you can redistribute it and/or modify it
77 under the same terms as Perl itself. See perlartistic.
78
80 BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
81 FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
82 WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
83 PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND,
84 EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
85 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
86 ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
87 YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
88 NECESSARY SERVICING, REPAIR, OR CORRECTION.
89
90 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
91 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
92 REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE
93 TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR
94 CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
95 SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
96 RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
97 FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
98 SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
99 DAMAGES.
100
101
102
103perl v5.12.0 2009-10-05 MooseX::Daemonize::WithPidFile(3)