| 1 | package Log::Dispatch::Configurator; | ||||||||||
| 2 | |||||||||||
| 3 | 15 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 15 | ▶ | use vars qw($VERSION); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 15 | $VERSION = '1.00'; | |||||||||
| 6 | |||||||||||
| 7 | 1 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 8 | 1 | my($class, $file) = @_; | |||||||||
| 9 | 1 | bless { file => $file }, $class; | |||||||||
| 10 | } | ||||||||||
| 11 | |||||||||||
| 12 | 16 | ▶ | sub myinit { | ||||||||
|
Subroutine
myinit: called CC=3 SCAR=11.7
Pod
undocumented
| |||||||||||
| 13 | 16 | my $self = shift; | |||||||||
| 14 | 16 | ▶ | $self->{LDC_ctime} = 0 unless defined $self->{LDC_ctime}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | 16 | ▶ | $self->{LDC_watch} = 0 unless defined $self->{LDC_watch}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | } | ||||||||||
| 17 | |||||||||||
| 18 | 2 | ▶ | sub reload { } | ||||||||
|
Subroutine
reload: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 19 | |||||||||||
| 20 | 2 | ▶ | sub needs_reload { | ||||||||
|
Subroutine
needs_reload: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 21 | 2 | my $self = shift; | |||||||||
| 22 | 2 | return $self->{LDC_ctime} < (stat($self->{file}))[9]; | |||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | 14 | ▶ | sub should_watch { | ||||||||
|
Subroutine
should_watch: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 26 | 14 | my $self = shift; | |||||||||
| 27 | 14 | ▶ | $self->{LDC_watch} = shift if @_; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | 14 | return $self->{LDC_watch}; | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 1 | ▶ | sub _abstract_method { | ||||||||
|
Subroutine
_abstract_method: called CC=1 SCAR=0.0
| |||||||||||
| 32 | 1 | require Carp; | |||||||||
| 33 | 1 | Carp::croak(shift, " is an abstract method of ", __PACKAGE__); | |||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | 1 | ▶ | sub get_attrs_global { _abstract_method('get_attrs_global') } | ||||||||
|
Subroutine
get_attrs_global: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 37 | 0 | ▶ | sub get_attrs { _abstract_method('get_attrs') } | ||||||||
|
Subroutine
get_attrs: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 38 | |||||||||||
| 39 | 15 | 1; | |||||||||
| 40 | __END__ | ||||||||||