Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

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