| 1 | package DBIx::Class::DeploymentHandler::Logger; | ||||||||||||||||||||||||||||
| 2 | 20 | $DBIx::Class::DeploymentHandler::Logger::VERSION = '0.002233'; | |||||||||||||||||||||||||||
| 3 | 20 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 20 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 20 | ▶ | use parent 'Log::Contextual::WarnLogger'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | # trace works the way we want it already | ||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | # sub is_trace { $_[0]->next::method } | ||||||||||||||||||||||||||||
| 11 | 284 | ▶ | sub is_debug { $_[0]->is_trace || $_[0]->next::method } | ||||||||||||||||||||||||||
|
Subroutine
is_debug: called CC=2 SCAR=7.6
Pod
documented
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 12 | 173 | ▶ | sub is_info { $_[0]->is_debug || $_[0]->next::method } | ||||||||||||||||||||||||||
|
Subroutine
is_info: called CC=2 SCAR=7.6
Pod
documented
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | sub is_warn { | ||||||||||||||||||||||||||||
| 15 | 0 | ▶ | my $orig = $_[0]->next::method; | ||||||||||||||||||||||||||
|
Subroutine
is_warn: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||||||||||||||||||
| 16 | 0 | ▶ | return undef if defined $orig && !$orig; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $orig and not $orig
MC/DC0%0/2
defined $orig and not $orig
defined $orig
not $orig
Truth table0%0/3
A and not(B)
A= defined $origB= not $orig
| |||||||||||||||||||||||||||||
| 17 | 0 | ▶ | return $_[0]->is_info || 1 | ||||||||||||||||||||||||||
|
Condition0%0/2
$_[0]->is_info || 1
MC/DC0%0/1
$_[0]->is_info || 1
$_[0]->is_info
Truth table0%0/2
A
A= $_[0]->is_info
| |||||||||||||||||||||||||||||
| 18 | } | ||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | sub is_error { | ||||||||||||||||||||||||||||
| 21 | 0 | ▶ | my $orig = $_[0]->next::method; | ||||||||||||||||||||||||||
|
Subroutine
is_error: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||||||||||||||||||
| 22 | 0 | ▶ | return undef if defined $orig && !$orig; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $orig and not $orig
MC/DC0%0/2
defined $orig and not $orig
defined $orig
not $orig
Truth table0%0/3
A and not(B)
A= defined $origB= not $orig
| |||||||||||||||||||||||||||||
| 23 | 0 | ▶ | return $_[0]->is_warn || 1 | ||||||||||||||||||||||||||
|
Condition0%0/2
$_[0]->is_warn || 1
MC/DC0%0/1
$_[0]->is_warn || 1
$_[0]->is_warn
Truth table0%0/2
A
A= $_[0]->is_warn
| |||||||||||||||||||||||||||||
| 24 | } | ||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | sub is_fatal { | ||||||||||||||||||||||||||||
| 27 | 0 | ▶ | my $orig = $_[0]->next::method; | ||||||||||||||||||||||||||
|
Subroutine
is_fatal: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||||||||||||||||||
| 28 | 0 | ▶ | return undef if defined $orig && !$orig; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $orig and not $orig
MC/DC0%0/2
defined $orig and not $orig
defined $orig
not $orig
Truth table0%0/3
A and not(B)
A= defined $origB= not $orig
| |||||||||||||||||||||||||||||
| 29 | 0 | ▶ | return $_[0]->is_error || 1 | ||||||||||||||||||||||||||
|
Condition0%0/2
$_[0]->is_error || 1
MC/DC0%0/1
$_[0]->is_error || 1
$_[0]->is_error
Truth table0%0/2
A
A= $_[0]->is_error
| |||||||||||||||||||||||||||||
| 30 | } | ||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | sub _log { | ||||||||||||||||||||||||||||
| 33 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
_log: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||
| 34 | 0 | my $level = shift; | |||||||||||||||||||||||||||
| 35 | 0 | my $message = join( "\n", @_ ); | |||||||||||||||||||||||||||
| 36 | 0 | ▶ | $message .= "\n" unless $message =~ /\n$/; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 37 | 0 | warn "[DBICDH] [$level] $message"; | |||||||||||||||||||||||||||
| 38 | } | ||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | sub new { | ||||||||||||||||||||||||||||
| 41 | 19 | ▶ | my ($self, $options, @rest) = @_; | ||||||||||||||||||||||||||
|
Subroutine
new: called CC=3 SCAR=11.4
Pod
documented
| |||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | 19 | ▶ | $options ||= {}; | ||||||||||||||||||||||||||
|
Condition50%1/2
$options ||= {}
MC/DC0%0/1
$options ||= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||||||||||
| 44 | 19 | ▶ | $options->{env_prefix} ||= 'DBICDH'; | ||||||||||||||||||||||||||
|
Condition50%1/2
$options->{"env_prefix"} ||= "DBICDH"
MC/DC0%0/1
$options->{"env_prefix"} ||= "DBICDH"
$options->{"env_prefix"}
Truth table50%1/2
A
A= $options->{"env_prefix"}
| |||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||
| 46 | 19 | $self->next::method($options, @rest) | |||||||||||||||||||||||||||
| 47 | } | ||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||
| 49 | 20 | 1; | |||||||||||||||||||||||||||