blib/lib/Catalyst/Plugin/Log/Log4perl.pm

filter: Statementstmt 100% 19 / 19 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 96.4% 27 / 28 CC 3 SCAR 6.9
CC
3
Cov
100%
setup
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
↑ Summary
1 package Catalyst::Plugin::Log::Log4perl;
2  
3 2 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use Log::Log4perl;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 our $VERSION = '0.02';
8  
9  
10 3 ▶sub setup {
Subroutine setup: called CC=3 SCAR=11.0
Pod undocumented
11 3 my $c = shift;
12  
13 3 my $config = $c->config->{'Plugin::Log::Log4perl'};
14 3 ▶ if( exists $config->{conf} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $config->{'conf'}) { } 2 1 3
15 2 ▶ if( defined $config->{watch_delay} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $config->{'watch_delay'}) { } 1 1 2
16 1 Log::Log4perl->init_and_watch( $config->{conf}, $config->{watch_delay} );
17 }
18 else {
19 1 Log::Log4perl->init( $config->{conf} );
20 }
21 }
22 else {
23 1 $c->log->warn( 'No Log::Log4perl configuration found' );
24 }
25  
26 3 $c->next::method( @_ )
27 }
28  
29  
30 2 1
31 __END__
↑ Summary