line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::MessageBus::Base; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
53284
|
use 5.006; |
|
4
|
|
|
|
|
16
|
|
|
4
|
|
|
|
|
176
|
|
4
|
4
|
|
|
4
|
|
24
|
use strict; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
131
|
|
5
|
4
|
|
|
4
|
|
24
|
use warnings; |
|
4
|
|
|
|
|
23
|
|
|
4
|
|
|
|
|
559
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Net::MessageBus::Base - Base class for Net::MessageBus modules |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 VERSION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Version 0.08 |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=cut |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our $VERSION = '0.08'; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 SUBROUTINES/METHODS |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head2 logger |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Getter / Setter for the logging object |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=cut |
26
|
|
|
|
|
|
|
sub logger { |
27
|
405
|
|
|
405
|
1
|
583
|
my $self = shift; |
28
|
405
|
50
|
|
|
|
1318
|
if ($_[0]) { |
29
|
0
|
|
|
|
|
0
|
$self->{logger} = $_[0]; |
30
|
|
|
|
|
|
|
} |
31
|
405
|
|
|
|
|
1838
|
return $self->{logger}; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head2 create_default_logger |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Creates the default logger that will be used |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
40
|
|
|
|
|
|
|
sub create_default_logger { |
41
|
23
|
|
|
23
|
1
|
156
|
my $logger; |
42
|
23
|
|
|
|
|
59
|
eval { |
43
|
4
|
|
|
4
|
|
6256
|
use Log::Log4perl qw(:easy); |
|
4
|
|
|
|
|
270407
|
|
|
4
|
|
|
|
|
33
|
|
44
|
23
|
|
|
|
|
266
|
Log::Log4perl->easy_init($ERROR); |
45
|
23
|
|
|
|
|
82875
|
$logger = Log::Log4perl->get_logger; |
46
|
|
|
|
|
|
|
}; |
47
|
23
|
50
|
|
|
|
1388
|
if ($@) { |
48
|
0
|
|
|
|
|
0
|
die "Error creating default logger for ". __PACKAGE__ . |
49
|
|
|
|
|
|
|
", please specify one or install Log::Log4perl! $@"; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
23
|
|
|
|
|
5117
|
return $logger; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 AUTHOR |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Horea Gligan, C<< >> |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 BUGS |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, or through |
63
|
|
|
|
|
|
|
the web interface at L. I will be notified, and then you'll |
64
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 SUPPORT |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
perldoc Net::MessageBus |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
You can also look for information at: |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=over 4 |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker (report bugs here) |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
L |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
L |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=item * CPAN Ratings |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
L |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=item * Search CPAN |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
L |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=back |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Copyright 2012 Horea Gligan. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
107
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
108
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=cut |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
1; # End of Net::MessageBus::Base |