+ - Use newer Future API, fix broken test
+
0.003002 - 2013-03-19
- Switch from CPS::Future to Future.pm
Moo => 1.001,
'Module::Runtime' => 0,
'JSON::PP' => 0,
- 'Future' => 0.10,
+ 'Future' => 0.29,
'MRO::Compat' => 0, # required to fatpack Moo
'Class::C3' => 0, # required to fatpack Moo
'String::ShellQuote' => 0, # required for ssh argument manipulation
my $invocant = shift;
my ($method) = our $AUTOLOAD =~ /^then::(.+)$/;
my @args = @_;
- return $invocant->and_then(sub {
- my ($obj) = $_[0]->get;
+ return $invocant->then(sub {
+ my ($obj) = @_;
return $obj->${\"start::${method}"}(@args);
});
}
my $res;
-S1S->start::get_s2->then::get_s3->on_ready(sub { ($res) = $_[0]->get });
+my @keep;
+
+push @keep,
+ S1S->start::get_s2->then::get_s3->on_ready(sub { ($res) = $_[0]->get });
is($res, 'S3', 'Synchronous code ok');
undef($res);
-S1F->start::get_s2->then::get_s3->on_ready(sub { ($res) = $_[0]->get });
+push @keep,
+ S1F->start::get_s2->then::get_s3->on_ready(sub { ($res) = $_[0]->get });
ok(!$S2F::C, 'Second future not yet constructed');