fixing changes
[gitmo/MooseX-Daemonize.git] / lib / MooseX / Daemonize / WithPidFile.pm
CommitLineData
d9e417f4 1package MooseX::Daemonize::WithPidFile;
2use strict;
3use Moose::Role;
4
d8985b7d 5use MooseX::Daemonize::Pid::File;
d9e417f4 6
7our $VERSION = 0.01;
8
d02fc704 9with 'MooseX::Daemonize::Core';
10
d9e417f4 11requires 'init_pidfile';
12
13has pidfile => (
d8985b7d 14 isa => 'MooseX::Daemonize::Pid::File',
d9e417f4 15 is => 'rw',
16 lazy => 1,
17 required => 1,
18 coerce => 1,
19 predicate => 'has_pidfile',
20 builder => 'init_pidfile',
21);
22
d02fc704 23after 'daemonize' => sub {
24 # NOTE:
25 # make sure that we do not have
26 # any bad PID values stashed around
27 # - SL
28 (shift)->pidfile->clear_pid
29};
30
d9e417f4 311;
32
8ac4733f 33__END__
34
35=pod
36
37=cut