okay NOW I think Core is done
[gitmo/MooseX-Daemonize.git] / lib / MooseX / Daemonize.pm
index da4923c..52e6734 100644 (file)
@@ -60,13 +60,13 @@ sub init_pidfile {
     my $self = shift;
     my $file = $self->pidbase . '/' . $self->progname . '.pid';
     confess "Cannot write to $file" unless (-e $file ? -w $file : -w $self->pidbase);
-    MooseX::Daemonize::PidFile->new( file => $file );
+    MooseX::Daemonize::Pid::File->new( file => $file );
 }
 
 sub start {
     my ($self) = @_;
     
-    confess "instance already running" if $self->pidfile->running;
+    confess "instance already running" if $self->pidfile->is_running;
     
     $self->daemonize unless $self->foreground;
 
@@ -74,12 +74,6 @@ sub start {
 
     $self->pidfile->pid($$);
 
-    # Avoid 'stdin reopened for output' warning with newer perls
-    ## no critic
-    open( NULL, '/dev/null' );
-    <NULL> if (0);
-    ## use critic
-
     # Change to basedir
     chdir $self->basedir;
 
@@ -208,7 +202,7 @@ The name of our daemon, defaults to $self->meta->name =~ s/::/_/;
 
 The base for our bid, defaults to /var/run/$progname
 
-=item pidfile MooseX::Daemonize::PidFile | Str
+=item pidfile MooseX::Daemonize::Pid::File | Str
 
 The file we store our PID in, defaults to /var/run/$progname