| 1 | package POE::Declare::Meta::Message; | ||
| 2 | |||
| 3 | =pod | ||
| 4 | |||
| 5 | =head1 NAME | ||
| 6 | |||
| 7 | POE::Declare::Meta::Message - A named message that is emitted to the parent | ||
| 8 | |||
| 9 | =head1 SYNOPSIS | ||
| 10 | |||
| 11 | # Declare the message (in the child) | ||
| 12 | declare ShutdownComplete => 'Message'; | ||
| 13 | |||
| 14 | # Emit the message (in the child) | ||
| 15 | $self->send_message('ShutdownComplete', 'param'); | ||
| 16 | |||
| 17 | # Register for the message (in the parent) | ||
| 18 | my $child = Foo::Child->new( | ||
| 19 | ShutdownComplete => $self->lookback('child_completed'), | ||
| 20 | ); | ||
| 21 | |||
| 22 | =head1 DESCRIPTION | ||
| 23 | |||
| 24 | Each L<POE::Declare> object contains a series of declared messages. | ||
| 25 | |||
| 26 | Message registration is done (primarily) during object creation, and | ||
| 27 | the parameter checking for each message parameter is checked in a defined | ||
| 28 | way. | ||
| 29 | |||
| 30 | =cut | ||
| 31 | |||
| 32 | 5 | ▶ | use 5.008007; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 33 | 5 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 34 | 5 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 35 | 5 | ▶ | use POE::Declare::Meta::Param (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 36 | |||
| 37 | 5 | ▶ | use vars qw{$VERSION @ISA}; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 38 | 5 | ▶ | BEGIN { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 39 | 5 | $VERSION = '0.59'; | |
| 40 | 5 | @ISA = 'POE::Declare::Meta::Param'; | |
| 41 | } | ||
| 42 | |||
| 43 | 3 | ▶ | sub as_perl { <<"END_PERL" } |
|
Subroutine
as_perl: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 44 | sub $_[0]->{name} { | ||
| 45 | \$_[0]->{$_[0]->{name}} or return ''; | ||
| 46 | \$_[0]->{$_[0]->{name}}->( \$_[0]->{Alias}, \@_[1..\$#_] ); | ||
| 47 | return 1; | ||
| 48 | } | ||
| 49 | END_PERL | ||
| 50 | |||
| 51 | 5 | 1; | |
| 52 | |||
| 53 | =pod | ||
| 54 | |||
| 55 | =head1 SUPPORT | ||
| 56 | |||
| 57 | Bugs should be always be reported via the CPAN bug tracker at | ||
| 58 | |||
| 59 | L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=POE-Declare> | ||
| 60 | |||
| 61 | For other issues, or commercial enhancement or support, contact the author. | ||
| 62 | |||
| 63 | =head1 AUTHORS | ||
| 64 | |||
| 65 | Adam Kennedy E<lt>adamk@cpan.orgE<gt> | ||
| 66 | |||
| 67 | =head1 SEE ALSO | ||
| 68 | |||
| 69 | L<POE>, L<POE::Declare> | ||
| 70 | |||
| 71 | =head1 COPYRIGHT | ||
| 72 | |||
| 73 | Copyright 2006 - 2012 Adam Kennedy. | ||
| 74 | |||
| 75 | This program is free software; you can redistribute | ||
| 76 | it and/or modify it under the same terms as Perl itself. | ||
| 77 | |||
| 78 | The full text of the license can be found in the | ||
| 79 | LICENSE file included with this module. | ||
| 80 | |||
| 81 | =cut | ||