| 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
| |||||||||||
| 15 | 2 | ▶ | if( defined $config->{watch_delay} ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 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__ | ||||||||||