File Coverage

blib/lib/POE/Declare/Meta/Event.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 22 22 100.0


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 event that can be targetted by POE events.
28              
29             In an Event, the non-core parameter constant SELF is used to retrieve
30             the current object (Since all objects are stored in the session heap,
31             SELF is actually just an alias for HEAP).
32              
33             =cut
34              
35 7     7   81 use 5.008007;
  7         14  
36 7     7   19 use strict;
  7         8  
  7         95  
37 7     7   20 use warnings;
  7         5  
  7         114  
38 7     7   22 use POE::Declare::Meta::Slot ();
  7         6  
  7         91  
39              
40 7     7   19 use vars qw{$VERSION @ISA};
  7         7  
  7         302  
41             BEGIN {
42 7     7   12 $VERSION = '0.23_01';
43 7         171 @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 - 2009 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