line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyrights 2007-2017 by [Mark Overmeer]. |
2
|
|
|
|
|
|
|
# For other contributors see ChangeLog. |
3
|
|
|
|
|
|
|
# See the manual pages for details on the licensing terms. |
4
|
|
|
|
|
|
|
# Pod stripped from pm file by OODoc 2.02. |
5
|
1
|
|
|
1
|
|
1767
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
29
|
|
6
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package Log::Report::Dispatcher::Callback; |
9
|
1
|
|
|
1
|
|
6
|
use vars '$VERSION'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
41
|
|
10
|
|
|
|
|
|
|
$VERSION = '1.21'; |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
5
|
use base 'Log::Report::Dispatcher'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
67
|
|
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
6
|
use Log::Report 'log-report'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub init($) |
18
|
0
|
|
|
0
|
0
|
|
{ my ($self, $args) = @_; |
19
|
0
|
|
|
|
|
|
$self->SUPER::init($args); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
$self->{callback} = $args->{callback} |
22
|
0
|
0
|
|
|
|
|
or error __x"dispatcher {name} needs a 'callback'", name => $self->name; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
$self; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
0
|
1
|
|
sub callback() {shift->{callback}} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub log($$$$) |
32
|
0
|
|
|
0
|
1
|
|
{ my $self = shift; |
33
|
0
|
|
|
|
|
|
$self->{callback}->($self, @_); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |