Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (22 sloc) 0.425 kB
package ReflexPromise;
use Moose;
extends 'Reflex::Base';
use Reflex::Callbacks qw(cb_promise);
has object => (
isa => 'Reflex::Base',
is => 'ro',
);
has promise => (
isa => 'ScalarRef',
is => 'ro',
default => sub { return \my $x },
);
sub BUILD {
my $self = shift;
$self->watch($self->object(), cb_promise($self->promise()));
}
sub next {
my $self = shift;
return ${$self->promise()}->next();
}
1;
Jump to Line
Something went wrong with that request. Please try again.