From: Karen Etheridge Date: Thu, 16 May 2013 18:29:26 +0000 (-0700) Subject: whitespace fixes X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Daemonize.git;a=commitdiff_plain;h=f3372ec96b39b4940acc393785b63df2ac229b96 whitespace fixes --- diff --git a/t/01.filecreate.t b/t/01.filecreate.t index 18fecd0..127c0e8 100644 --- a/t/01.filecreate.t +++ b/t/01.filecreate.t @@ -26,8 +26,8 @@ $ENV{MX_DAEMON_STDERR} = catfile($dir, 'Err.txt'); with qw(MooseX::Daemonize); has filename => ( isa => 'Str', is => 'ro' ); - - after start => sub { + + after start => sub { my $self = shift; if ($self->is_daemon) { $self->create_file( $self->filename ); @@ -82,14 +82,14 @@ is($app->exit_code, MooseX::Daemonize->OK, '... got the right error code'); if (DEBUG) { diag `ps $pid`; - diag "Status is: " . $app->status_message; + diag "Status is: " . $app->status_message; } ok( -e $app->filename, "file exists" ); if (DEBUG) { diag `ps $pid`; - diag "Status is: " . $app->status_message; + diag "Status is: " . $app->status_message; } ok( $app->stop, '... app stopped' ); @@ -102,7 +102,7 @@ is($app->exit_code, MooseX::Daemonize->ERROR, '... got the right error code'); if (DEBUG) { diag `ps $pid`; - diag "Status is: " . $app->status_message; + diag "Status is: " . $app->status_message; } ok( not(-e $app->pidfile->file) , '... pidfile gone' ); diff --git a/t/02.stdout.t b/t/02.stdout.t index 42afda6..b5facae 100644 --- a/t/02.stdout.t +++ b/t/02.stdout.t @@ -17,7 +17,7 @@ my $Test = Test::Builder->new; after start => sub { my ($self) = @_; - $self->output_ok() + $self->output_ok() if $self->is_daemon; }; @@ -51,8 +51,8 @@ sleep(3); # give ourself a chance to produce some output my $warnings = ""; { - local $SIG{__WARN__} = sub { $warnings .= $_[0]; warn @_ }; - $app->stop( no_exit => 1 ); + local $SIG{__WARN__} = sub { $warnings .= $_[0]; warn @_ }; + $app->stop( no_exit => 1 ); } is($warnings, "", "No warnings from stop"); diff --git a/t/10.pidfile.t b/t/10.pidfile.t index bcb6ba1..e515bc6 100644 --- a/t/10.pidfile.t +++ b/t/10.pidfile.t @@ -25,7 +25,7 @@ BEGIN { ); is($f->file->slurp(chomp => 1), $f->pid, '... the PID in the file is correct'); - + ok($f->is_running, '... it is running too'); is( @@ -53,8 +53,8 @@ BEGIN { is($f->file->slurp(chomp => 1), $f->pid, '... the PID in the file is correct'); is($f->pid, $$, '... the PID is our current process'); - - ok($f->is_running, '... it is running too'); + + ok($f->is_running, '... it is running too'); is( exception { $f->remove }, @@ -67,7 +67,7 @@ BEGIN { { my $PID = 9999; - + my $f = MooseX::Daemonize::Pid::File->new( file => [ 't', 'baz.pid' ], pid => $PID, @@ -75,7 +75,7 @@ BEGIN { isa_ok($f, 'MooseX::Daemonize::Pid::File'); isa_ok($f->file, 'Path::Class::File'); - + is($f->pid, $PID, '... the PID is our made up PID'); is( diff --git a/t/30.with_pid_file.t b/t/30.with_pid_file.t index d44cb11..deb0917 100644 --- a/t/30.with_pid_file.t +++ b/t/30.with_pid_file.t @@ -12,7 +12,7 @@ my $dir = tempdir( CLEANUP => 1 ); BEGIN { - use_ok('MooseX::Daemonize::Core'); + use_ok('MooseX::Daemonize::Core'); } use constant DEBUG => 0; @@ -24,33 +24,33 @@ $ENV{MX_DAEMON_STDERR} = catfile($dir, 'Err.txt'); { package MyFooDaemon; use Moose; - + with 'MooseX::Daemonize::WithPidFile'; - + sub init_pidfile { MooseX::Daemonize::Pid::File->new( file => $PIDFILE ) } - + sub start { my $self = shift; - - # this tests our bad PID + + # this tests our bad PID # cleanup functionality. print "Our parent PID is " . $self->pidfile->pid . "\n" if ::DEBUG; - + $self->daemonize; return unless $self->is_daemon; - + # make it easy to find with ps $0 = 'test-app-2'; - $SIG{INT} = sub { - print "Got INT! Oh Noes!"; + $SIG{INT} = sub { + print "Got INT! Oh Noes!"; $self->pidfile->remove; exit; - }; + }; while (1) { - print "Hello from $$\n"; - sleep(10); + print "Hello from $$\n"; + sleep(10); } exit; }