line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package POE::Declare::Meta::Event; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=pod |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
POE::Declare::Meta::Event - Declares a named POE event |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use POE::Declare; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub shutdown : Event { |
14
|
|
|
|
|
|
|
my $self = $_[SELF]; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# Shutdown our child first |
17
|
|
|
|
|
|
|
$self->child->post('shutdown'); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# Wait for the child to tell us it is finished |
20
|
|
|
|
|
|
|
return 1; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 DESCRIPTION |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Taking advantage of the subroutine attribute feature of recent versions |
26
|
|
|
|
|
|
|
of Perl, the C attribute is used to register a function/method as |
27
|
|
|
|
|
|
|
an named event that can be targetted by POE. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
In an Event, the non-default array constant SELF is used to retrieve |
30
|
|
|
|
|
|
|
the current object (Since each objects are stored in the session heap, |
31
|
|
|
|
|
|
|
SELF is actually just an alias for HEAP, but adds some clarity). |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
34
|
|
|
|
|
|
|
|
35
|
4
|
|
|
4
|
|
65
|
use 5.008007; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
154
|
|
36
|
4
|
|
|
4
|
|
19
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
106
|
|
37
|
4
|
|
|
4
|
|
19
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
84
|
|
38
|
4
|
|
|
4
|
|
19
|
use POE::Declare::Meta::Slot (); |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
71
|
|
39
|
|
|
|
|
|
|
|
40
|
4
|
|
|
4
|
|
18
|
use vars qw{$VERSION @ISA}; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
246
|
|
41
|
|
|
|
|
|
|
BEGIN { |
42
|
4
|
|
|
4
|
|
7
|
$VERSION = '0.59'; |
43
|
4
|
|
|
|
|
162
|
@ISA = 'POE::Declare::Meta::Slot'; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=pod |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 SUPPORT |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Bugs should be always be reported via the CPAN bug tracker at |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
L |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
For other issues, or commercial enhancement or support, contact the author. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 AUTHORS |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Adam Kennedy Eadamk@cpan.orgE |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 SEE ALSO |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
L, L |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 COPYRIGHT |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Copyright 2006 - 2012 Adam Kennedy. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
This program is free software; you can redistribute |
71
|
|
|
|
|
|
|
it and/or modify it under the same terms as Perl itself. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
The full text of the license can be found in the |
74
|
|
|
|
|
|
|
LICENSE file included with this module. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=cut |