| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
1
|
|
|
1
|
|
1118
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
38
|
|
|
2
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
36
|
|
|
3
|
1
|
|
|
1
|
|
1028
|
use utf8; |
|
|
1
|
|
|
|
|
10
|
|
|
|
1
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Log::Contextual::LogDispatchouli; |
|
6
|
|
|
|
|
|
|
BEGIN { |
|
7
|
1
|
|
|
1
|
|
92
|
$Log::Contextual::LogDispatchouli::AUTHORITY = 'cpan:KENTNL'; |
|
8
|
|
|
|
|
|
|
} |
|
9
|
|
|
|
|
|
|
{ |
|
10
|
|
|
|
|
|
|
$Log::Contextual::LogDispatchouli::VERSION = '0.001000'; |
|
11
|
|
|
|
|
|
|
} |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# ABSTRACT: A Log::Dispatchouli specific wrapper for Log::Contextual |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
902
|
use Moo; |
|
|
1
|
|
|
|
|
19433
|
|
|
|
1
|
|
|
|
|
6
|
|
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
extends 'Log::Contextual'; |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
## no critic (ProhibitPackageVars, Capitalization) |
|
21
|
|
|
|
|
|
|
our $Router_Instance; |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub router { |
|
25
|
|
|
|
|
|
|
return ( |
|
26
|
0
|
|
0
|
0
|
1
|
|
$Router_Instance ||= do { |
|
27
|
0
|
|
|
|
|
|
require Log::Contextual::Router::LogDispatchouli; |
|
28
|
0
|
|
|
|
|
|
Log::Contextual::Router::LogDispatchouli->new; |
|
29
|
|
|
|
|
|
|
} |
|
30
|
|
|
|
|
|
|
); |
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
|
|
33
|
1
|
|
|
1
|
|
1917
|
no Moo; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
5
|
|
|
34
|
|
|
|
|
|
|
1; |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=pod |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=encoding UTF-8 |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 NAME |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Log::Contextual::LogDispatchouli - A Log::Dispatchouli specific wrapper for Log::Contextual |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 VERSION |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
version 0.001000 |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
L<< C<Log::Dispatchouli>|Log::Dispatchouli >> doesn't need much to get it to work with L<< C<Log::Contextual>|Log::Contextual >> however, |
|
53
|
|
|
|
|
|
|
it has one teeny annoying quirk in that its stack traces are always off by one. |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Which has two primary side effects: |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=over 4 |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=item 1. Under L<< C<Log::Contextual>|Log::Contextual >>, it shows errors coming from C<LC>, not C<LC>'s caller ( Useless ) |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=item 2. Under L<< C<Moose>|Moose >>, if you use a delegation, C<LD> will report problems coming from the delegate ( Useless ) |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=back |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
So this module exists to solve #2, and it has to solve #1 in the process. |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 METHODS |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head2 C<router> |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
This is the only difference this module has from L<< C<Log::Contextual>|Log::Contextual >>, |
|
72
|
|
|
|
|
|
|
and its that it returns a L<< C<Log::Contextual::Router::LogDispatchouli>|Log::Contextual::Router::LogDispatchouli >> instead of the default router. |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 USAGE |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
use Log::Contextual::LogDispatchouli qw( set_logger ); |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
set_logger $ld; |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Other than that, this module is just a wrapper around the rest of L<< C<Log::Contextual>|Log::Contextual >> |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 AUTHOR |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Kent Fredric <kentfredric@gmail.com> |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
This software is copyright (c) 2013 by Kent Fredric <kentfredric@gmail.com>. |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
91
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=cut |