Zing::Zang - Callback-based Actor
Callback-based Actor Implementation
use Zing::Zang;
my $zang = Zing::Zang->new(
on_perform => sub {
my ($self) = @_;
$self->{performed}++
}
);
# $zang->execute;
This package provides a standard Zing::Process which uses callbacks and
doesn't need to be subclassed. It supports providing the standard process
perform
method as on_perform
and receive
method as on_receive
which
operate as expected.
This package inherits behaviors from:
This package uses type constraints from:
This package has the following attributes:
on_perform(Maybe[CodeRef])
This attribute is read-only, accepts (Maybe[CodeRef])
values, and is optional.
on_receive(Maybe[CodeRef])
This attribute is read-only, accepts (Maybe[CodeRef])
values, and is optional.
Al Newkirk, awncorp@cpan.org
Copyright (C) 2011-2019, Al Newkirk, et al.
This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".