Collector/Format/Base.pm

filter: Statementstmt 66.6% 4 / 6 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 75.0% 6 / 8 CC 1 SCAR 1.4
CC
1
Cov
67%
BEGIN
1.3
BEGIN
1.0
CRAP 1.1
« Model/Database/Messaging/Result/Log.pm ↑ Summary Collector/Format/Logs.pm »
1 package XAS::Collector::Format::Base;
2  
3 our $VERSION = '0.01';
4  
5 1 ▶use POE;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 use XAS::Class
8 0 ▶ debug => 0,
Subroutine BEGIN: called CC=1 SCAR=2.6
9 version => $VERSION,
10 base => 'XAS::Lib::POE::Session',
11 1 ;
12  
13 # ----------------------------------------------------------------------
14 # Public Methods
15 # ----------------------------------------------------------------------
16  
17 sub session_initialize {
18 my $self = shift;
19  
20 my $alias = $self->alias;
21  
22 $self->log->debug("$alias: entering session_initialize()");
23  
24 $poe_kernel->state('format_data', $self);
25  
26 # walk the chain
27  
28 $self->SUPER::session_initialize();
29  
30 $self->log->debug("$alias: leasing session_initialize()");
31  
32 }
33  
34 # ----------------------------------------------------------------------
35 # Public Events
36 # ----------------------------------------------------------------------
37  
38 # ----------------------------------------------------------------------
39 # Private Methods
40 # ----------------------------------------------------------------------
41  
42 1;
43  
44 __END__
45  
46 =head1 NAME
47  
48 XAS::Collector::Format::Base - A class for the XAS environment
49  
50 =head1 SYNOPSIS
51  
52 use XAS::Class
53 debug => 0,
54 version => '0.01',
55 base => 'XAS::Collector::Format::Base'
56 ;
57  
58 =head1 DESCRIPTION
59  
60 This module is the base class for formatting data.
61  
62 =head1 METHODS
63  
64 =head2 new
65  
66 This module inherits from L<XAS::Lib::POE::Session|XAS::Lib::POE::Session> and
67 takes the same parameters.
68  
69 =head1 PUBLIC EVENTS
70  
71 This module declares the following events:
72  
73 =head2 format_data
74  
75 This event is called when data is available for formatting.
76  
77 =head1 SEE ALSO
78  
79 =over 4
80  
81 =item L<XAS::Collector::Format::Alerts|XAS::Collector::Format::Alerts>
82  
83 =item L<XAS::Collector::Format::Logs|XAS::Collector::Format::Logs>
84  
85 =item L<XAS::Colletor|XAS::Collector>
86  
87 =item L<XAS|XAS>
88  
89 =back
90  
91 =head1 AUTHOR
92  
93 Kevin L. Esteb, E<lt>kevin@kesteb.usE<gt>
94  
95 =head1 COPYRIGHT AND LICENSE
96  
97 Copyright (c) 2012-2015 Kevin L. Esteb
98  
99 This is free software; you can redistribute it and/or modify it under
100 the terms of the Artistic License 2.0. For details, see the full text
101 of the license at http://www.perlfoundation.org/artistic_license_2_0.
102  
103 =cut
« Model/Database/Messaging/Result/Log.pm ↑ Summary Collector/Format/Logs.pm »