1MooseX::Daemonize::WithUPsiedrFiCloen(t3rpimb)uted PerlMDooocsuemXe:n:tDaateimoonnize::WithPidFile(3pm)
2
3
4
6 MooseX::Daemonize::WithPidFile - A Role with the core daemonization and
7 pidfile management
8
10 version 0.22
11
13 package My::Daemon;
14 use Moose;
15
16 with 'MooseX::Daemonize::WithPidFile';
17
18 sub start {
19 my $self = shift;
20 # daemonize me ...
21 $self->daemonize; # << this will write the pidfile for you
22 # return from the parent,...
23 return unless $self->is_daemon;
24 # but continue on in the child (daemon)
25 }
26
28 This is a slightly extended basic daemonization Role, it provides
29 Pidfile management along with the core daemonization features found in
30 MooseX::Daemonize::Core.
31
33 pidfile (is = rw, isa => MooseX::Daemonize::Pid::File)>
34 This attribute holds the MooseX::Daemonize::Pid::File object used
35 to manage the Pidfile. It will initialize the object using the
36 "init_pidfile" method (which is required by this role).
37
39 init_pidfile
40 This method is used to build the pidfile attribute's object. It
41 should return a MooseX::Daemonize::Pid::File object.
42
43 has_pidfile
44 This is a predicate method to tell you if your pidfile attribute
45 has been initialized yet.
46
48 daemonize
49 This adds an "after" method modifier to the "daemonize" method
50 (from MooseX::Daemonize::Core) and handles writing your Pidfile for
51 you.
52
53 meta
54 The meta() method from Class::MOP::Class
55
57 Moose::Role, MooseX::Getopt and MooseX::Daemonize::Pid::File
58
60 Bugs may be submitted through the RT bug tracker
61 <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Daemonize>
62 (or bug-MooseX-Daemonize@rt.cpan.org <mailto:bug-MooseX-
63 Daemonize@rt.cpan.org>).
64
65 There is also a mailing list available for users of this distribution,
66 at <http://lists.perl.org/list/moose.html>.
67
68 There is also an irc channel available for users of this distribution,
69 at "#moose" on "irc.perl.org" <irc://irc.perl.org/#moose>.
70
72 • Stevan Little <stevan.little@iinteractive.com>
73
74 • Chris Prather <chris@prather.org>
75
77 This software is copyright (c) 2007 by Chris Prather.
78
79 This is free software; you can redistribute it and/or modify it under
80 the same terms as the Perl 5 programming language system itself.
81
82 Portions heavily borrowed from Proc::Daemon which is copyright Earl
83 Hood.
84
85
86
87perl v5.36.0 2023-01-20MooseX::Daemonize::WithPidFile(3pm)