| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | package POE::Component::Supervisor::Interface; | ||
| 4 | 23 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 23 | ▶ | use namespace::clean -except => 'meta'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 23 | requires qw( | |
| 9 | notify_spawned | ||
| 10 | notify_stopped | ||
| 11 | ); | ||
| 12 | |||
| 13 | 23 | __PACKAGE__ | |
| 14 | |||
| 15 | __END__ | ||
| 16 | |||
| 17 | =pod | ||
| 18 | |||
| 19 | =head1 NAME | ||
| 20 | |||
| 21 | POE::Component::Supervisor::Interface - Minimal interface for supervisors | ||
| 22 | |||
| 23 | =head1 SYNOPSIS | ||
| 24 | |||
| 25 | package My::Supervisor; | ||
| 26 | with qw(POE::Component::Supervisor::Interface); | ||
| 27 | |||
| 28 | |||
| 29 | |||
| 30 | =head1 DESCRIPTION | ||
| 31 | |||
| 32 | This role lets you implement your own supervisor, reusing | ||
| 33 | L<POE::Component::Supervisor::Supervised> and | ||
| 34 | L<POE::Component::Supervisor::Handle> implementations. | ||
| 35 | |||
| 36 | This is useful if you'd like to start/stop/monitor child components/processes | ||
| 37 | without the monitoring/restarting logic in L<POE::Component::Supervisor> | ||
| 38 | itself. | ||
| 39 | |||
| 40 | =head1 REQUIRED METHODS | ||
| 41 | |||
| 42 | |||
| 43 | |||
| 44 | =cut | ||
| 45 | |||
| 46 | |||