| 1 | ################################################## | ||||||||||||||||||||
| 2 | package Log::Log4perl::Layout::SimpleLayout; | ||||||||||||||||||||
| 3 | ################################################## | ||||||||||||||||||||
| 4 | # as documented in | ||||||||||||||||||||
| 5 | # http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/SimpleLayout.html | ||||||||||||||||||||
| 6 | ################################################## | ||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 54 | ▶ | use 5.006; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | 54 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 10 | 54 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 11 | 54 | ▶ | use Log::Log4perl::Level; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | 54 | ▶ | no strict qw(refs); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 14 | 54 | ▶ | use base qw(Log::Log4perl::Layout); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | ################################################## | ||||||||||||||||||||
| 17 | 90 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.2
Pod
undocumented
| |||||||||||||||||||||
| 18 | ################################################## | ||||||||||||||||||||
| 19 | 90 | my $class = shift; | |||||||||||||||||||
| 20 | 90 | ▶ | $class = ref ($class) || $class; | ||||||||||||||||||
|
Condition33%1/3
ref $class || $class
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table33%1/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | 90 | my $self = { | |||||||||||||||||||
| 23 | format => undef, | ||||||||||||||||||||
| 24 | info_needed => {}, | ||||||||||||||||||||
| 25 | stack => [], | ||||||||||||||||||||
| 26 | }; | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | 90 | bless $self, $class; | |||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | 90 | return $self; | |||||||||||||||||||
| 31 | } | ||||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | ################################################## | ||||||||||||||||||||
| 34 | 148 | ▶ | sub render { | ||||||||||||||||||
|
Subroutine
render: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 35 | ################################################## | ||||||||||||||||||||
| 36 | 148 | my($self, $message, $category, $priority, $caller_level) = @_; | |||||||||||||||||||
| 37 | |||||||||||||||||||||
| 38 | 148 | return "$priority - $message\n"; | |||||||||||||||||||
| 39 | } | ||||||||||||||||||||
| 40 | |||||||||||||||||||||
| 41 | 54 | 1; | |||||||||||||||||||
| 42 | |||||||||||||||||||||
| 43 | __END__ | ||||||||||||||||||||