3 package MooseX::Daemonize::Pid;
6 use Moose::Util::TypeConstraints;
8 coerce 'MooseX::Daemonize::Pid'
10 => via { MooseX::Daemonize::Pid->new( pid => $_ ) };
17 clearer => 'clear_pid',
18 predicate => 'has_pid',
22 sub is_running { kill(0, (shift)->pid) ? 1 : 0 }
32 MooseX::Daemonize::Pid - PID management for MooseX::Daemonize
36 This is a very basic Pid management object, it doesn't do all that
37 much, and mostly just serves as a base class for L<MooseX::Daemonize::Pid::File>.
53 This will clear the value of the I<pid> attribute. It is useful for making sure
54 that the parent process does not have a bad value stored in it.
58 This is a predicate method to tell you if your I<pid> attribute has
63 This checks to see if the I<pid> is running.
67 The C<meta()> method from L<Class::MOP::Class>
75 =head1 INCOMPATIBILITIES
79 =head1 BUGS AND LIMITATIONS
81 No bugs have been reported.
83 Please report any bugs or feature requests to
84 C<bug-acme-dahut-call@rt.cpan.org>, or through the web interface at
85 L<http://rt.cpan.org>.
89 Stevan Little C<< <stevan.little@iinteractive.com> >>
91 =head1 LICENCE AND COPYRIGHT
93 Copyright (c) 2007-2011, Chris Prather C<< <perigrin@cpan.org> >>. All rights
96 This module is free software; you can redistribute it and/or
97 modify it under the same terms as Perl itself. See L<perlartistic>.
99 =head1 DISCLAIMER OF WARRANTY
101 BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
102 FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
103 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
104 PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
105 EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
106 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
107 ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
108 YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
109 NECESSARY SERVICING, REPAIR, OR CORRECTION.
111 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
112 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
113 REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
114 LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
115 OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
116 THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
117 RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
118 FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
119 SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF