POE::Component::Supervisor::Supervised - A role for supervision descriptors.
# See e.g. POE::Component::Supervisor::Supervised::Proc;
All children supervised by the POE::Component::Supervisor must do this role.
This role provides an API for instantiating POE::Component::Supervisor::Handle as required by the supervisor, corresponding to living instances of the child. The POE::Component::Supervisor::Supervised objects serve as descriptors for these handles, and know how to spawn the actual child.
One of permanent, transient or temporary.
permanent
transient
temporary
Defaults to transient.
See should_restart.
should_restart
This attribute should be extended by your class to provide a default for _inherit_attributes_from_handle_class (and subsequently create_handle) to work.
_inherit_attributes_from_handle_class
create_handle
Calls new on handle_class with the arguments.
new
handle_class
Iterates the inherited attributes and copies them from the $self, and also passes $self as the child parameter, along with all provided arguments to construct_handle.
$self
child
construct_handle
Returns a boolean value, which instructs the supervisor as to whether or not the child should be restarted after exit.
If the child is permanent this always returns true.
If the child is transient this returns true if is_abnormal_exit returns true.
is_abnormal_exit
If the child is temporary this returns false.
Required.
Given exit arguments from the handle, check whether or not the exit was normal or not.
For example POE::Component::Supervisor::Supervised::Proc will by default check if the exit status is 0.
Only applies to transient children.
Creates a new POE::Component::Supervisor::Handle object for the supervisor.
An alias for spawn by default.
spawn
May be overridden if respawning requires cleanup first, or something like that.
Boolean query methods that operatoe on restart_policy.
restart_policy
To install POE::Component::Supervisor, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POE::Component::Supervisor
CPAN shell
perl -MCPAN -e shell install POE::Component::Supervisor
For more information on module installation, please visit the detailed CPAN module installation guide.