Declare/Meta/Event.pm

filter: Statementstmt 100% 17 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 23 / 23 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Declare/Meta/Message.pm ↑ Summary Declare/Meta/Internal.pm »
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<Event> 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 5 ▶use 5.008007;
Subroutine BEGIN: called CC=1 SCAR=0.0
36 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
37 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
38 5 ▶use POE::Declare::Meta::Slot ();
Subroutine BEGIN: called CC=1 SCAR=0.0
39  
40 5 ▶use vars qw{$VERSION @ISA};
Subroutine BEGIN: called CC=1 SCAR=0.0
41 5 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
42 5 $VERSION = '0.59';
43 5 @ISA = 'POE::Declare::Meta::Slot';
44 }
45  
46 5 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<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=POE-Declare>
55  
56 For other issues, or commercial enhancement or support, contact the author.
57  
58 =head1 AUTHORS
59  
60 Adam Kennedy E<lt>adamk@cpan.orgE<gt>
61  
62 =head1 SEE ALSO
63  
64 L<POE>, L<POE::Declare>
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
« Declare/Meta/Message.pm ↑ Summary Declare/Meta/Internal.pm »