Navigation Menu

Skip to content

Commit

Permalink
slightly more consistent examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 27, 2016
1 parent a8815dc commit 86d410c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/Mojo/IOLoop.pm
Expand Up @@ -617,11 +617,11 @@ EXPERIMENTAL and might change without warning!
sub {
my $sp = shift;
sleep 5;
return 1 + 1, 2 + 2;
return '♥', 'Mojolicious';
},
sub {
my ($sp, $err, @results) = @_;
say "The results are $results[0] and $results[1]";
say "I $results[0] $results[1]!";
}
);
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/IOLoop/Subprocess.pm
Expand Up @@ -64,11 +64,11 @@ Mojo::IOLoop::Subprocess - Subprocesses
sub {
my $sp = shift;
sleep 5;
return 1 + 1, 2 + 2;
return '♥', 'Mojolicious';
},
sub {
my ($sp, $err, @results) = @_;
say "The results are $results[0] and $results[1]";
say "I $results[0] $results[1]!";
}
);
Expand Down
4 changes: 2 additions & 2 deletions t/mojo/subprocess.t
Expand Up @@ -29,7 +29,7 @@ is $result, 0 . $sp->pid . ('x' x 100000), 'right result';
($fail, $result) = ();
$sp = Mojo::IOLoop::Subprocess->new;
$sp->run(
sub { return 1, [{two => 2}], 3 },
sub { return '', [{two => 2}], 3 },
sub {
my ($sp, $err, @results) = @_;
$fail = $err;
Expand All @@ -38,7 +38,7 @@ $sp->run(
);
Mojo::IOLoop->start;
ok !$fail, 'no error';
is_deeply $result, [1, [{two => 2}], 3], 'right structure';
is_deeply $result, ['', [{two => 2}], 3], 'right structure';

# Event loop in subprocess
($fail, $result) = ();
Expand Down

0 comments on commit 86d410c

Please sign in to comment.