NAME

Promises6::Listener - A listener.

VERSION

version 0.001

SYNOPSIS

use Evo::Base -strict;
use Promises6::Builder;

my $bldr     = Promises6::Builder->new();
my $parent_d = $bldr->deferred;
my $child_d  = $bldr->deferred;
my $listener = $bldr->listener(deferred => $child_d);

$parent_d->subscribe($listener);
$child_d->promise->then(sub($v) { say "resolved $v" });

$parent_d->resolve('foo');

DESCRIPTION

This module is for internal usage only and should be used directly

ATTRIBUTES

cbs, deferred

Internal attributes

builder

An instance of Promises6::Builder

METHODS

get_msg

Gets a message from the deferred, evaluate one of the L</"cbs"> (CB) and
initiate the resolution procudure of L</"deferred"> with the result of that
invocation

If corresponding CB is not a function, changes a state or notify
L</"deferred">

AUTHOR

alexbyk <alexbyk.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by alexbyk.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.